tag:blogger.com,1999:blog-40933236529034265392024-02-19T09:42:49.044+01:00Cajón de sastre de KounchCosas que hago con el Mac que, quizás, podrían interesar a otra persona (algún día)Unknownnoreply@blogger.comBlogger21125tag:blogger.com,1999:blog-4093323652903426539.post-14858760903413877362015-09-13T18:18:00.002+02:002015-09-13T18:25:29.109+02:00Configurando un servidor de cómics en una Raspberry Pi<div style="text-align: justify;">
<span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">Para los que tenemos una colección más o menos grande de cómics digitales, debido al tamaño que suelen tener los archivos, es complicado tener acceso a todo desde aplicaciones móviles (ej: iPad), ya que no caben todos en la memoria. Sin embargo, desde hace unos meses, existe una solución muy interesante: <a href="https://github.com/beville/ComicStreamer" target="_blank">ComicStreamer</a></span></div>
<div style="text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Se trata de un proyecto bastante interesante que permite tener un servidor de streaming de cómics. ¿Qué quiere decir esto? Que permite visualizar cómics digitales (CBR, CBZ, PDF) sin tener que descargarlos enteros en donde los estés leyendo, bien con un navegador web (Windows, Mac, Linux, iOS, Android), o bien con alguna aplicación compatible (“<a href="http://chunkyreader.com/" target="_blank">Chunky Comic reader</a></span>” <span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">en el iPad). El servidor envía sólo las páginas que estás leyendo, en vez del fichero de cómic entero.</span></div>
<div style="text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Además, si la biblioteca tiene <a href="https://code.google.com/p/comictagger/" target="_blank">debidamente etiquetados</a> los ficheros, quedan clasificados y se puede hacer búsquedas por serie, autor, personajes, ubicaciones, arco argumental, etc.</span></div>
<div style="text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Así, es posible tener toda la biblioteca en un lugar centralizado en tu casa y luego ver los cómics desde el resto de aparatos, sin tener que andar copiando un sólo fichero entre ellos.</span></div>
<div style="text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Aunque la descarga oficial sólo trae el programa preparado para Mac o Windows, es relativamente fácil hacer que funcione en cualquier cosa que tenga soporte para el lenguaje Python.</span></div>
<div style="text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Estos son los pasos para hacer que funcione en una <a href="https://www.raspberrypi.org/" target="_blank">Raspberry Pi</a> con <a href="https://www.archlinux.org/" target="_blank">Arch Linux</a> como sistema operativo.</span></div>
<br />
<a name='more'></a><br />
<h2>
<span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">Paquetes a instalar</span></h2>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> - Python 2, libwebp, Virtualenv para Python 2, unzip</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> - (Recomendables) Avahi y nss-mdns, configurados que el servidor se anuncie de forma automática en la red local</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> - (Sólo durante la instalación, luego se pueden borrar) make, libtool ,gcc, binutils, libmpc, wget, gc, guile, libatomic_ops</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">En el caso de Arch Linux, se pueden instalar fácilmente usando:</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">> pacman -S —-needed …</span><br />
<br />
<h2>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Preparación del entorno Virtualenv</span></h2>
<div style="text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">- Elegimos un lugar (directorio) donde ubicar todos los ejecutables (por ej: </span><span style="font-family: Courier New, Courier, monospace;">/var/opt/comicstreamer</span><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">) y creamos un entorno virtual:</span></div>
<span style="font-family: Courier New, Courier, monospace;">> mkdir -p /var/opt/comicstreamer/</span><br />
<span style="font-family: Courier New, Courier, monospace;">> virtualenv2 /var/opt/comicstreamer/</span><br />
<span style="font-family: Courier New, Courier, monospace;">> source /var/opt/comicstreamer/bin/activat</span><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">e</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> - Instalamos los paquetes de Python necesarios en el entorno virtual:</span><br />
<span style="font-family: Courier New, Courier, monospace;">> pip install tornado sqlalchemy watchdog python-dateutil pillow configobj natsort paver unrar PyPDF2 </span><br />
<span style="font-family: Courier New, Courier, monospace;">> pip install --allow-external pybonjour --allow-unverified pybonjour pybonjour</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">- Obtenemos la última versión de <a href="https://github.com/beville/ComicStreamer/network" target="_blank">Comicstreamer</a> y la descomprimimos, bien del código original, bien de alguno de los derivados que han ido apareciendo (a mí me gusta el de <a href="https://github.com/davide-romanini/ComicStreamer" target="_blank">davide-romanini</a> porque las páginas cargan más rápido y tiene algunas mejoras interesantes):</span></div>
<span style="font-family: Courier New, Courier, monospace;">> mkdir /var/opt/comicstreamer/master</span><br />
<span style="font-family: Courier New, Courier, monospace;">> cd /var/opt/comicstreamer/master</span><br />
<span style="font-family: Courier New, Courier, monospace;">> wget https://github.com/beville/ComicStreamer/archive/master.zip</span><br />
<span style="font-family: Courier New, Courier, monospace;">> unzip master.zip</span><br />
<span style="font-family: Courier New, Courier, monospace;">> rm -f master.zip</span><br />
<span style="font-family: Courier New, Courier, monospace;">> mv ComicStreamer-master/ master</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">- Si se trata de alguna de las versiones más recientes, podemos compilar las librerías de unrar:</span></div>
<span style="font-family: Courier New, Courier, monospace;">> paver libunrar</span><br />
<br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">- Borramos ficheros que no son necesarios:</span><br />
<span style="font-family: Courier New, Courier, monospace;">> cd /var/opt/comicstreamer/master</span><br />
<span style="font-family: Courier New, Courier, monospace;">> rm -rf libunrar/unrar libunrar/unrarsrc-5.3.2.tar.gz </span><br />
<span style="font-family: Courier New, Courier, monospace;">> rm -rf master/mac master/windows</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<br />
<h2>
<span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">Configurando el servidor para que se inicie de forma automática como servicio de systemd</span></h2>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">- Creamos usuario y grupo para la ejecución, y le damos permisos adecuados:</span><br />
<span style="font-family: Courier New, Courier, monospace;">> groupadd --system comicstreamer</span><br />
<span style="font-family: Courier New, Courier, monospace;">> useradd --system -c 'ComicStreamer daemon user' -g comicstreamer -d /var/opt/comicstreamer -s /bin/false comicstreamer</span><br />
<span style="font-family: Courier New, Courier, monospace;">> chown -R comicstreamer:comicstreamer /var/opt/comicstreamer/</span><br />
<br />
<div style="text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">- Creamos el fichero de configuración del servicio, </span><span style="font-family: Courier New, Courier, monospace;">/etc/systemd/system/comicstreamer.service</span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">:</span></div>
<span style="font-family: Courier New, Courier, monospace;">[Unit]</span><br />
<span style="font-family: Courier New, Courier, monospace;">Description=ComicStreamer Service</span><br />
<span style="font-family: Courier New, Courier, monospace;">Requires=network.target local-fs.target remote-fs.target</span><br />
<span style="font-family: Courier New, Courier, monospace;">After=network.target local-fs.target remote-fs.target</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />
[Service]</span><br />
<span style="font-family: Courier New, Courier, monospace;">User=comicstreamer</span><br />
<span style="font-family: Courier New, Courier, monospace;">ExecStart=/bin/bash -c 'source /var/opt/comicstreamer/bin/activate && /var/opt/comicstreamer/master/comicstreamer && deactivate'</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />
[Install]</span><br />
<span style="font-family: Courier New, Courier, monospace;">WantedBy=multi-user.target</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">- Activamos el servicio y lo iniciamos:</span><br />
<span style="font-family: Courier New, Courier, monospace;">> systemctl daemon-reload</span><br />
<span style="font-family: Courier New, Courier, monospace;">> systemctl enable comicstreamer</span><br />
<span style="font-family: Courier New, Courier, monospace;">> systemctl start comic streamer</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Si hemos seguido bien todos los pasos, en la dirección </span><span style="font-family: Courier New, Courier, monospace;">http://nombredelaraspberry:32500 </span><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">debería estar disponible la página web de comicstreamer</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-26206365915775675512014-02-01T21:09:00.000+01:002014-02-03T09:35:14.519+01:00Añadiendo soporte para un mando a juegos de Feral Interactive<div style="text-align: justify;">
Los últimos juegos de Feral Interactive (por ejemplo, Batman: Arkham City o Tomb Raider) están diseñados con un sistema modular que define los mandos soportados. Tal y como ellos indican (ver <a href="http://support.feralinteractive.com/es/mac-games/tombraider/faqs/controllers/" target="_blank">aquí</a>, por ejemplo), pueden ampliar con relativa facilidad el soporte de uno de sus juegos. Sin embargo, si el mando que tienes es demasiado viejo o poco popular, podría suceder que no hagan caso a tu petición.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Vamos a ver qué podemos hacer nosotros par añadir por nuestra cuenta soporte a un mando USB antiguo.</div>
<div style="text-align: justify;">
</div>
<a name='more'></a>Lo primero es comprobar si el juego tiene la estructura adecuada para añadir soporte a un nuevo mando. Debemos localizarlo en nuestro disco duro, pulsar con el botón derecho, y elegir la opción "Mostrar Contenido del paquete".<br />
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggyM1fZXLVIM0fQX76V1jVgAw95gmYRn4ELeCfwueZ2rV3rc6eTk_Ns8mUqd3AnBAWaJnk-v1F6IqKdH92fW2d76cOsWNpxZ56mdWzD5guAtMcMIBOYa66gSM2q3qwF6631gwSmwxsySE/s1600/Captura+de+pantalla+2014-02-01+a+la(s)+19.35.28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggyM1fZXLVIM0fQX76V1jVgAw95gmYRn4ELeCfwueZ2rV3rc6eTk_Ns8mUqd3AnBAWaJnk-v1F6IqKdH92fW2d76cOsWNpxZ56mdWzD5guAtMcMIBOYa66gSM2q3qwF6631gwSmwxsySE/s1600/Captura+de+pantalla+2014-02-01+a+la(s)+19.35.28.png" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Ahora, comprobamos que existe una estructura de directorios así:</div>
<div style="text-align: left;">
<span style="font-family: Courier New, Courier, monospace;">Contents/Resources/InputDevices/</span></div>
<div style="text-align: justify;">
...y dentro varias carpetas con ficheros <span style="font-family: Courier New, Courier, monospace;">.plist</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Si es así, estamos de suerte y podemos crear nuestra propia configuración para el mando.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Ahora, vamos a identificar nuestro mando y sus botones y palancas, para poder preparar la información. Conectamos el mando a un puerto USB y abrimos "Información del Sistema" (dentro de <span style="font-family: Courier New, Courier, monospace;">/Aplicaciones/Utilidades</span>).</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEi7jxX_fz2AVkHaW2Bzqylkl5GsEbJUBJXdiy6B_c08VX2tte8ACxwWxnKZ97JKyjYrmnedHmYR1rqpLMTIxqKsEIqC7UFwOjPwMx2c7l30iDunMWMgmncPu-Olx6BJIio6dtfcHedQs/s1600/Captura+de+pantalla+2014-02-01+a+la(s)+19.28.21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEi7jxX_fz2AVkHaW2Bzqylkl5GsEbJUBJXdiy6B_c08VX2tte8ACxwWxnKZ97JKyjYrmnedHmYR1rqpLMTIxqKsEIqC7UFwOjPwMx2c7l30iDunMWMgmncPu-Olx6BJIio6dtfcHedQs/s1600/Captura+de+pantalla+2014-02-01+a+la(s)+19.28.21.png" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Una vez abierta, miramos la información de nuestro mando</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj24tNmhLqR2oJfKIKt8GrDGHNL3e2dPtl6PAzxBau_r37-epAnN4zu9rr8O90JBFBZAQKAb4dcg-EW-XR69spgH-i1kvOmxHtHWqAzg0ajGWGKLuSr4pLFrOQU6g1GyB4yvl1ddfvhvIY/s1600/Captura+de+pantalla+2014-02-01+a+la(s)+19.27.37.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj24tNmhLqR2oJfKIKt8GrDGHNL3e2dPtl6PAzxBau_r37-epAnN4zu9rr8O90JBFBZAQKAb4dcg-EW-XR69spgH-i1kvOmxHtHWqAzg0ajGWGKLuSr4pLFrOQU6g1GyB4yvl1ddfvhvIY/s1600/Captura+de+pantalla+2014-02-01+a+la(s)+19.27.37.png" height="427" width="640" /></a></div>
<div style="text-align: justify;">
Tomamos nota del ID del producto y el ID del fabricante. Estos números están en hexadecimal, así que usamos la calculadora para saber el valor en decimal. En nuestro ejemplo, ID del producto: 41728 (a300) e ID del fabricante: 1784 (06f8).</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Ahora, vamos a identificar los botones y palancas del mando. Para ello, descargamos la aplicación "Joystick and gamepad tester" (desde <a href="http://alphaomega.software.free.fr/joystickandgamepadtester/Joystick%20And%20Gamepad%20Tester.html" target="_blank">aquí</a>).</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Con el mando conectado, abrimos la aplicación, pulsamos todos los botones y rogamos las distintas palancas disponibles, y tomamos nota de los números de los botones,los tipos de palancas, los valores máximos y mínimos, etc. que tiene nuestro mando.</div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv2tkmXCwAGHkgOP9h1wDqLFMrOm8XIxyIaqPclKvoi9Jg8ZsIVcduVraGYr2gEnv-QuY03vbVO5Km49jyMKlRvU7Lvjfhc3fwM5LDaIP3dbqybTm2ip1K3SI-zj2cj3SZj0qpg5rUbMw/s1600/Captura+de+pantalla+2014-02-01+a+la(s)+18.27.21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv2tkmXCwAGHkgOP9h1wDqLFMrOm8XIxyIaqPclKvoi9Jg8ZsIVcduVraGYr2gEnv-QuY03vbVO5Km49jyMKlRvU7Lvjfhc3fwM5LDaIP3dbqybTm2ip1K3SI-zj2cj3SZj0qpg5rUbMw/s1600/Captura+de+pantalla+2014-02-01+a+la(s)+18.27.21.png" height="400" width="356" /></a></div>
</div>
<div style="text-align: justify;">
En el caso concreto que estamos utilizando, la asignación de los botones respecto, por ejemplo, a un mando de XBox es la siguiente:</div>
<div style="text-align: justify;">
<table cellpadding="0" cellspacing="0" style="border-collapse: collapse;">
<tbody>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;"><b>DALeader</b></span></td>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;"><b>XBox</b></span></td>
</tr>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><div align="right" style="text-align: right;">
<span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">1</span></div>
</td>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">LeftShoulder</span></td>
</tr>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><div align="right" style="text-align: right;">
<span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">2</span></div>
</td>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">LeftTrigger</span></td>
</tr>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><div align="right" style="text-align: right;">
<span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">3</span></div>
</td>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">RightShoulder</span></td>
</tr>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><div align="right" style="text-align: right;">
<span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">4</span></div>
</td>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">RightTrigger</span></td>
</tr>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><div align="right" style="text-align: right;">
<span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">5</span></div>
</td>
<td style="background-color: #00ccff; border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">ButtonX</span></td>
</tr>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><div align="right" style="text-align: right;">
<span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">6</span></div>
</td>
<td style="background-color: #fcf305; border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">ButtonY</span></td>
</tr>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><div align="right" style="text-align: right;">
<span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">7</span></div>
</td>
<td style="background-color: #dd0806; border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">ButtonB</span></td>
</tr>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><div align="right" style="text-align: right;">
<span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">8</span></div>
</td>
<td style="background-color: #99cc00; border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">ButtonA</span></td>
</tr>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><div align="right" style="text-align: right;">
<span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">9</span></div>
</td>
<td style="background-color: #969696; border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">LeftThumb</span></td>
</tr>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><div align="right" style="text-align: right;">
<span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">10</span></div>
</td>
<td style="background-color: #969696; border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">RightThumb</span></td>
</tr>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><div align="right" style="text-align: right;">
<span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">11</span></div>
</td>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">ButtonBack</span></td>
</tr>
<tr>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 67.0px;" valign="bottom"><div align="right" style="text-align: right;">
<span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">12</span></div>
</td>
<td style="border-color: #000000 #000000 #000000 #000000; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; height: 13.0px; padding: 2.0px 2.0px 2.0px 2.0px; width: 88.0px;" valign="bottom"><span style="color: black; font-family: Calibri; font-size: 11px; letter-spacing: 0px;">ButtonStart</span></td></tr>
</tbody></table>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Ahora volvamos al directorio <span style="font-family: 'Courier New', Courier, monospace;">Contents/Resources/InputDevices/Digital/</span> y hagamos una copia del archivo <span style="font-family: Courier New, Courier, monospace;">LogitechRumblePad2.plist</span>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Si abrimos este fichero con un editor de texto, veremos que tiene una estructura muy concreta, que es la que indica cómo se relacionan los botones del mando con los botones que usaremos en el juego. De hecho, la forma de nombrarlos está muy relacionada con los botones de un mando de XBox.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNFXoYaDlocoPNVmJzSGSAS7rPOewWp3WU5dG0oQauyvUFjksSzF0rr-SGTqrTLZwWS1mixi9rH7cQlR9e_el-Yllu2YUNnUaPxNZMKuEMcCxOc_tuyKiUFzuyv82bGIQO-uy2HI-qpQo/s1600/Captura+de+pantalla+2014-02-01+a+la(s)+20.49.54.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNFXoYaDlocoPNVmJzSGSAS7rPOewWp3WU5dG0oQauyvUFjksSzF0rr-SGTqrTLZwWS1mixi9rH7cQlR9e_el-Yllu2YUNnUaPxNZMKuEMcCxOc_tuyKiUFzuyv82bGIQO-uy2HI-qpQo/s1600/Captura+de+pantalla+2014-02-01+a+la(s)+20.49.54.png" height="640" width="619" /></a></div>
<div style="text-align: justify;">
Pues bien, ahora renombraremos el fichero a nuestro gusto (para el ejemplo en que estamos yo he elegido el nombre <span style="font-family: Courier New, Courier, monospace;">GuillemotDALeader.plist</span>) y vamos a modificarlo para nuestras necesidades, según los siguientes criterios:</div>
<div style="text-align: justify;">
<ul>
<li>Se debe indicar los valores VendorID con ID del fabricante y ProductID con ID del producto</li>
<li>Los botones normales se identifican con 9:n donde n es el número de botón.</li>
<li>Los analógicos suelen ser identificados por sus ejes X e Y con códigos 1:48,1:49 (izquierda, X e Y), 1:53,1:54 (derecha, X e Y) y se indican en los valores: <span style="font-family: Courier New, Courier, monospace;">AxisX, AxisY</span></li>
<li>Además, para los analógicos se deben tener en cuenta el máximo, mínimo y valor neutro, con los valores: <span style="font-family: Courier New, Courier, monospace;">AxisX-Min, AxisX-Max, </span><span style="font-family: inherit;">(…)</span><span style="font-family: Courier New, Courier, monospace;">, XAxisInitValue</span>, etc.</li>
<li>Para un D-Pad o HatSwitch, el código suele ser 1:49, en el valor <span style="font-family: Courier New, Courier, monospace;">HatSwitch</span> y luego se indica siempre el mismo tipo de valores para arriba (<span style="font-family: Courier New, Courier, monospace;">HSValueUp</span>), abajo, diagonales, etc.</li>
</ul>
</div>
<div style="text-align: justify;">
De esta manera, el fichero en nuestro caso, quedaría modificado así:</div>
<div style="text-align: left;">
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><?xml version="1.0" encoding="UTF-8"?></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><plist version="1.0"></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><dict></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>CGPDeviceType</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>Rumble2</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>VendorID</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><real>1784</real></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>ProductID</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><integer>41728</integer></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>LeftAxisX</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>1:48</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>LeftAxisX-Min</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>0</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>LeftAxisX-Max</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>255</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>LeftAxisY</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>1:49</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>LeftAxisY-Min</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>0</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>LeftAxisY-Max</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>255</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>LeftTrigger</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:2</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>RightAxisX</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>1:53</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>RightAxisX-Min</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>0</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>RightAxisX-Max</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>255</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>RightAxisY</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>1:54</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>RightAxisY-Min</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>0</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>RightAxisY-Max</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>255</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>RightTrigger</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:4</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>ButtonA</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:8</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>ButtonB</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:7</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>ButtonX</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:5</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>ButtonY</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:6</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>LeftShoulder</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:1</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>RightShoulder</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:3</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>LeftThumb</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:9</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>RightThumb</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:10</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>ButtonStart</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:12</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>ButtonBack</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:11</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>ButtonDevice</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:13</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>DPadUp</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>0</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>DPadDown</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>0</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>DPadLeft</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>0</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>DPadRight</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>0</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>Hatswitch</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>1:57</string></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>HSValueRest</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><integer>15</integer></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>HSValueUp</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><integer>0</integer></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>HSValueUpRight</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><integer>1</integer></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>HSValueRight</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><integer>2</integer></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>HSValueDownRight</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><integer>3</integer></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>HSValueDown</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><integer>4</integer></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>HSValueDownLeft</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><integer>5</integer></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>HSValueLeft</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><integer>6</integer></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>HSValueUpLeft</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><integer>7</integer></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>XAxisInitValue</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><integer>127</integer></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>YAxisInitValue</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><integer>127</integer></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"></dict></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"></plist></span></div>
<div>
<br /></div>
<div style="text-align: justify;">
Observar, a modo de ejemplo, comparando con la tabla de más arriba, cómo hemos asignado el botón número 8 del mando, al botón tipo A de XBoX:</div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><key>ButtonA</key></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><string>9:8</string></span></div>
</div>
<div>
<br /></div>
<div style="text-align: justify;">
Finalmente, tras haber preparado nuestro fichero, sólo hemos de dejarlo en la carpeta con el resto de archivos .plist, e iniciar el juego para comprobar que los controles funcionan.</div>
<div style="text-align: justify;">
<br /></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-82496356120870409522013-06-21T10:03:00.002+02:002013-06-21T10:03:54.193+02:00Compilación de OpenDNIe en OS X Mountain Lion<div style="text-align: justify;">
<br />
<br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Los tiempos cambian, y la <a href="http://kounch-mac.blogspot.com.es/2011/02/compilacion-de-opendnie-para-mac-os-x.html">antigua entrada dedicada a cómo compilar OpenDNIe en OS X</a> se ha quedado muy obsoleta, y la mayor parte de lo que se explica allí ya no sirve para OS X 10.8 (Mountain Lion).<span style="font-size: large;"><br /></span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br /></span>
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Así que, vamos a ver qué se puede hacer para compilar una versión más reciente de OpenDNIe en ese sistema.</span><br />
<br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Como hice en su día, he dejado disponible </span><a href="http://www.kounch.com/download/opendnie/mountainlion.html"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">aquí</span></a><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"> para quien no tenga los medios, los conocimientos o las ganas de hacer esto, y mientras no haya una versión oficial en OpenSC.</span></div>
<div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"></span><br />
<a name='more'></a></div>
</div>
<div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"></span></div>
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"></span><br />
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-size: large;">Requerimientos previos </span></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span style="font-size: small;">Como ocurría con las versiones anteriores, <span style="font-size: small;">se nece<span style="font-size: small;">sita tener instaladas las herramientas para desarrolladores de Apple<span style="font-size: small;"> <span style="font-size: small;">(X<span style="font-size: small;">code)</span></span></span>. Sin embargo, debido a la forma en que han ido modific<span style="font-size: small;">ándolas, ahora es neces<span style="font-size: small;">er<span style="font-size: small;">io hacer unos pocos pas<span style="font-size: small;">os m<span style="font-size: small;">ás.</span></span></span></span></span></span></span></span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;">Tras haber instalado <span style="font-size: small;">XCode (<span style="font-size: small;">grau<span style="font-size: small;">ito)</span></span>, desde la <span style="font-size: small;">M<span style="font-size: small;">ac A<span style="font-size: small;">pp Store, se debe acceder a las preferencias, y realizar la descarga del com<span style="font-size: small;">ponente "Command Line Tools".</span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZnbCpcg7XVKotr-awv1sc5NAEdtcxk7cO3SphNy5QqNaDAyxaHxIb0Z0c6GrUQzuzJcIYgnNC_olNciK4cd9Xt8cHqLEOruNKVt6s9bgEZSHm-ZhP0SXi0oec5XLQFfisY7SOgMdzfM4/s1600/xcode-command-line-install.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZnbCpcg7XVKotr-awv1sc5NAEdtcxk7cO3SphNy5QqNaDAyxaHxIb0Z0c6GrUQzuzJcIYgnNC_olNciK4cd9Xt8cHqLEOruNKVt6s9bgEZSHm-ZhP0SXi0oec5XLQFfisY7SOgMdzfM4/s400/xcode-command-line-install.png" width="400" /></a></div>
<br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;">Además, el component<span style="font-size: small;">e PackageMaker<span style="font-size: small;">, que sirve </span>para cr<span style="font-size: small;">e<span style="font-size: small;">ar paquetes de insta<span style="font-size: small;">lación desde la línea de comandos, está ahora sólo disponible como una descarga aparte desde la web (<a href="https://developer.apple.com/downloads/index.action">https://developer.apple.com/downloads/index.action</a> - buscar Auxiliary Tools for XCode). Tras descargarlo, se debe dejar en la carpeta Aplicaciones<span style="font-size: small;">.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;">Finalmente, como ya ocurría con versiones anteriores, se debe instalar </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><a href="http://www.gnu.org/software/autoconf/">autoconf</a> <a href="http://www.gnu.org/software/automake/">automake</a><span style="font-size: small;">, </span> <a href="http://www.gnu.org/software/libtool/">libtool</a><span style="font-size: small;">, pkgconfig y curl</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">. Para mí lo más cómodo es hacerlo usando <a href="http://www.macports.org/">MacPorts</a>:</span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ sudo port install autoconf<br />$ sudo port install automake<br />$ sudo port install libtool +universal<br />$ sudo port install pkgconfig +universal<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />$ sudo port install curl +universal</span></span> </span></span></div>
<div style="text-align: justify;">
</div>
<div>
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">También es posible hacer esta instalación usando <a href="http://porticus.alittledrop.com/">Porticus</a>, una interfaz gráfica para MacPorts.</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-size: large;">Compilación e instalación</span></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span style="font-size: small;">Ahora, debemos descargar el código fuente<span style="font-size: small;"> de una versión de OpenSC<span style="font-size: small;">-OpenDNIe compatible con Mou<span style="font-size: small;">ntain Lion. En el <span style="font-size: small;">momento de escribir estas líneas, <span style="font-size: small;">está pendien<span style="font-size: small;">te una petición para i<span style="font-size: small;">ncorporar al código principal de OpenSC todos los cambios existentes en:</span></span></span></span></span></span></span></span></span><br />
<a href="https://github.com/OpenDNIe/OpenSC/tree/opendnie"><span style="font-size: small;"><span style="font-family: Verdana, sans-serif;">https://github.com/OpenDNIe/OpenSC/tree/opendnie</span></span></a><br />
<span style="font-size: small;"><span style="font-family: Verdana, sans-serif;">Así que usaremos esa versió<span style="font-size: small;">n para t<span style="font-size: small;">rabajar.</span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: small;"><span style="font-size: small;">Tras haberlo descargado y descomprimido en un direc<span style="font-size: small;">t<span style="font-size: small;">orio, p<span style="font-size: small;">uesto que <span style="font-size: small;">la versión actual de OpenSC no está preparada para generar correctamente un paquete de tokend válido, debemos<span style="font-size: small;"> </span></span></span></span></span></span></span></span></span>quitar toda<span style="font-size: small;"> esa parte de<span style="font-size: small;">l proceso. </span></span><br />
<span style="font-size: small;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;">Para ello, <span style="font-size: small;">se debe modificar el fichero que hay en <span style="font-family: "Courier New",Courier,monospace;">MacOSX/build-package.in</span><span style="font-size: small;">,<span style="font-size: small;"> haciendo los siguentes cambios:</span></span></span></span></span></span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: Verdana, sans-serif;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Check out OpenSC.tokend, if not already fetched.<br />#if ! test -e OpenSC.tokend; then<br /># git clone http://github.com/OpenSC/OpenSC.tokend.git<br />#fi<br /><br /># Fetch binary dependencies<br />#if ! test -f build-10.6.tar.gz; then<br /># curl -O https://www.opensc-project.org/downloads/build-10.6.tar.gz<br />#fi<br /><br /># Check for correctness<br />#if ! test $(md5 -q build-10.6.tar.gz) == "5686fb4dda6e9f1f07d06293a25fdd37"; then<br /># echo "MD5 of binary components does not match!"<br /># exit 1<br />#fi<br /><br /># Unpack the binary building components<br />#if ! test -e OpenSC.tokend/build; then<br /># tar -C OpenSC.tokend -xzvf build-10.6.tar.gz<br />#fi<br /><br /># Create the symlink to OpenSC sources<br />#test -L OpenSC.tokend/build/opensc-src || ln -sf ${BUILDPATH}/src OpenSC.tokend/build/opensc-src<br /><br /># build and copy OpenSC.tokend<br />#xcodebuild -configuration Deployment -project OpenSC.tokend/Tokend.xcodeproj<br />#mkdir -p target/System/Library/Security/tokend<br />#mv OpenSC.tokend/build/OpenSC.tokend target/System/Library/Security/tokend</span></span> </span></span></span></span></span></span></span></span><br />
</div>
<div style="text-align: left;">
<br /><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Una vez corregido, compilamos.</span></div>
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ ./MacOSX/build</span><br />
</div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Una vez haya terminado, habrá creado en directorio tanto el paquete de instalación como una imagen de disco con el mismo. </span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br /></span>
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Ahora podemos instalar el paquete, y hacer los mismos pasos <a href="http://kounch-mac.blogspot.com.es/2011/02/compilacion-de-opendnie-para-mac-os-x.html">que indicaba en la entrada anterior</a> (obviamente, salvo los relativos a tokend, que hemos excluido del paquete).</span></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-16487618148783522212011-08-02T21:53:00.002+02:002011-08-23T20:39:12.726+02:00WSUS Offline Update en OS X Lion<div style="text-align: justify;">Para quien no lo conozca, WSUS Offline Update (<a href="http://www.wsusoffline.net/">http://www.wsusoffline.net/</a>), antes CTUpdate, es un proyecto bajo GNU GPL que permite actualizar cualquier equipo con sistema operativo Microsoft Windows (y opcionalmente Microsoft Office), de un manera rápida, segura y sin tener conexión de red o conexión a internet.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Las primeras versiones estaban hechas a base de scripts de AutoIt, pero las últimas también incluyen unos script de Bash que, si se dispone de las utilidades adecuadas de la línea de comandos, son compatibles al 100% con OS X.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">A continuación, explicaremos la forma de compilar las herramientas que no vienen de serie en OS X. Para quien no tenga los medios o la paciencia para hacerlo, se puede bajar una versión compilada (para OS X Lion, aunque puede que funcionen en versiones anteriores de Mac OS X para Intel), desde <a href="http://www.kounch.com/download/sh.zip">aquí</a>. Luego bastaría con seguir las instrucciones de instalación y uso al final de esta misma entrada.</div><div style="text-align: justify;"></div><a name='more'></a><br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-size: large;">Herramientas necesarias</span></div><div style="text-align: justify;">Las utilidades que faltan en OS X son las siguientes:</div><div style="text-align: justify;">wget (<a href="http://ftp.gnu.org/gnu/wget/">http://ftp.gnu.org/gnu/wget/</a>)</div><div style="text-align: justify;">hashdeep (<a href="http://md5deep.sourceforge.net/#download">http://md5deep.sourceforge.net/#download</a>)</div><div style="text-align: justify;">cabextract (<a href="http://www.cabextract.org.uk/)">http://www.cabextract.org.uk/)</a></div><div style="text-align: justify;">xmlstarlet (<a href="http://xmlstar.sourceforge.net/">http://xmlstar.sourceforge.net/</a>)</div><div style="text-align: justify;">dos2unix o tofrodos (<a href="http://www.thefreecountry.com/tofrodos/">http://www.thefreecountry.com/tofrodos/</a>)</div><div style="text-align: justify;">mkisofs (<a href="http://cdrecord.berlios.de/private/cdrecord.html">http://cdrecord.berlios.de/private/cdrecord.html</a>)</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Podemos obtenerlas usando MacPorts (buscar wget, md5deep, cabextract, xmlstarlet, dos2unix y cdrtools), o bien bajando el código fuente y compilando una a una. En nuestro caso, será este último el método que utilizaremos. Este procedimiento debería ser válido para cualquier versión reciente del sistema (Leopard, Snow Leopard o Lion).</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: large;">Creación de los ejecutables necesarios</span></div><div style="text-align: justify;">En primer lugar, si no las tuviéramos ya, instalaremos las herramientas de desarrollo. Se pueden obtener desde los discos que venían con el Mac o descargándolas de forma gratuita desde la web de desarrolladores de Apple (para versiones anteriores a OS X Lion), o bien, en el caso de OS X Lion, de forma gratuita en Mac App Store.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Vamos a crear archivos binarios universales (32-bit y 64-bit). Si simplemente quisiéramos compilarlo para la arquitectura de nuestro sistema operativo, bastará con omitir los pasos para i386, así como la creación de binarios universales (comando lipo). Según el programa que sea, hay distintos métodos distintos para crear los binarios.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">El primer método es el que se utiliza con wget.</div><div style="text-align: justify;">Descomprimimos el código fuente que habremos descargado</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">tar -xjf wget-1.12.tar.gz</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">cd wget-1.12</span></div><div style="text-align: justify;">Configuramos y compilamos para la arquitectura nativa de nuestro Mac en este caso es (64-bit)</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">./configure</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">make</span></div><div style="text-align: justify;">Guardamos el binario que hemos creado</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">mv ./src/wget ./src/wget.x86_64</span></div><div style="text-align: justify;">Limpiamos, y configuramos para la otra arquitectura (en este caso sería para 32-bit, si quisiéramos que fuera para 64-bit, cambiaríamos i396 por x86_64)</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">make clean</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">export CFLAGS='-arch i386'</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">export LDFLAGS='-arch i386'</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">./configure</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">make</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">export CFLAGS=</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">export LDFLAGS=</span></div><div style="text-align: justify;">Guardamos el binario que hemos creado</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">mv ./src/wget ./src/wget.i386</span></div><div style="text-align: justify;">Unimos los dos binarios en uno sólo, universal</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">cd src</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">lipo -create -arch i386 wget.i386 -arch x86_64 wget.x86_64 -output wget</span></div><div style="text-align: justify;">Guardamos el archivo wget para su uso posterior. El resto se puede borrar.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Para compilar cabextract, debido a la forma en que se enlazan los binarios, podemos hacer que se genere de una única vez el binario universal:</div><div style="text-align: justify;">Descomprimimos el código fuente</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">tar -xjf cabextract-1.4.tar.gz</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">cd cabextract-1.4</span></div><div style="text-align: justify;">Ajustamos lo necesario para hacer compilación simultánea para 32-bit y 64-bit</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">export CFLAGS='-arch i386 -arch x86_64'</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">export LDFLAGS='-arch i386 -arch x86_64'</span></div><div style="text-align: justify;">Y configuramos y compilamos</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">./configure</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">make</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">export CFLAGS=</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">export LDFLAGS=</span></div><div style="text-align: justify;">Guardamos el archivo cabextract para su uso posterior. El resto se puede borrar.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Para obtener hashdeep se utiliza el mismo método que para wget (el binario a guardar se genera en el directorio <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">./hashdeep/hashdeep</span>)</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">En el caso de dos2unix, debemos seguir estos pasos:</div><div style="text-align: justify;">Descomprimir el código fuente</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">tar -xjf tofrodos-1.7.9.tar.tar.gz</span></div><div style="text-align: justify;">Editar Makefile cambiando</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">CFLAGS = $(DEFINES) $(TFLAG) $(CDEBUG) -c -Wall</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">...</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">LDFLAGS = $(LDEBUG)</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">por</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">CFLAGS = $(DEFINES) $(TFLAG) $(CDEBUG) -c -Wall -arch i386 -arch x86_64</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">...</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">LDFLAGS = $(LDEBUG) -arch i386 -arch x86_64</span></div><div style="text-align: justify;">Compilar fromdos </div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">cd tofrodos</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">cd src</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">make</span></div><div style="text-align: justify;">Reservar para después el archivo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">fromdos</span> cambiando el nombre a <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">dos2unix</span>.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Para xmlstarlet también se utiliza el método usado en wget y hashdeep (el binario se genera en <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">./xml</span>), pero además debemos copiar ./examples/xmlstarlet y modificarlo para que sea así:</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#!/bin/sh</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">abspath=$(cd ${0%/*} && echo $PWD/${0##*/})</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">exepath=`dirname "$abspath"`</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">xml="${abs_builddir-$exepath/..}"/xml</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">if [ x"$OSTYPE" = xmsys ] ; then</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> exec "$exepath/xmlstarlet.msys" "$xml" "$@"</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">fi</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">exec "$xml" "$@"</span></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Para el caso de mkisofs, también se utiliza un método similar al usado para dos2unix:</div><div style="text-align: justify;">Descomprimimos el código fuente y compilamos para nuestra arquitectura nativa</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">tar -xjf cdrtools-3.00.tar.gz</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">cd cdrtools-3.00</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">make</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">...</span></div><div style="text-align: justify;">Y llegaremos a un punto en el que, debido a un bug aún no corregido (al menos en la versión 3.00), en OS X Lion, el proceso se queda detenido, apareciendo en pantalla</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span>==> GENERATING include file "../incs/i386-darwin-cc/avoffset.h"</span></div><div style="text-align: justify;">Pulsaremos <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Ctrl-Z</span> y volveremos a lanzar la compilación, que esta vez terminará correctamente.</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">make</span></div><div style="text-align: justify;">Copiar el archivo mkisofs/OBJ/i386-darwin-cc/mkisofs y renombrar a mkisofs.x86_64</div><div style="text-align: justify;">Ahora editamos el archivo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">RULES/cc-gcc.rul</span> e introducimos estos cambios (añadimos la arquitectura no nativa, en este caso 32-bit, i386).</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">CPPFLAGS=<span class="Apple-tab-span" style="white-space: pre;"> </span>-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) -arch i386</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">CFLAGS=<span class="Apple-tab-span" style="white-space: pre;"> </span>$(COPTS) $(CWARNOPTS) $(COPTOPT) $(GCCOPTOPT) $(COPTX) -arch i386</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">..</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">LDFLAGS=<span class="Apple-tab-span" style="white-space: pre;"> </span>$(LDOPTS) $(LDOPTX) -arch i386</span></div><div style="text-align: justify;">Limpiamos la compilación y la volvemos a lanzar para que ahora sea con los nuevos parámetros</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">make clean</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">make</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">...</span></div><div style="text-align: justify;">De nuevo, llegaremos al punto en el que el proceso se queda detenido, apareciendo en pantalla</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span>==> GENERATING include file "../incs/i386-darwin-cc/avoffset.h"</span></div><div style="text-align: justify;">Pulsaremos <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Ctrl-Z</span> y volveremos a lanzar la compilación.</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">make</span></div><div style="text-align: justify;">Copiamos el archivo ./mkisofs/OBJ/i386-darwin-cc/mkisofs y lo renombramos a mkisofs.i386</div><div style="text-align: justify;">Creamos el binario universal</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">lipo -create -arch i386 mkisofs.i386 -arch x86_64 mkisofs.x86_64 -output mkisofs</span></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Para finalizar, crearemos un script de texto llamado <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">DownloadUpdates_OSX.sh</span> y con este contenido.</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#!/bin/bash</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">abspath=$(cd "${0%/*}" && echo "$PWD/${0##*/}")</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">fabspath=`dirname "$abspath"`</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">cd "$fabspath"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">export PATH=$PATH:$fabspath</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">./DownloadUpdates.sh $@</span><br />
</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">Ahora ya dispondremos de todas las herramientas compiladas que necesita el script para funcionar. Sólo falta preparar el entorno adecuado para que todo funcione.</div><div><br />
</div><div><br />
</div><br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-size: large;">Instalación final y uso</span></div><div style="text-align: justify;">Descomprimimos WSUS Offline Update y copiamos todos los ejecutables (<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">wget, cabextract, hashdeep, dos2unix, xml, xmlstarlet, mkisofs y DownloadUpdates_OSX.sh</span>) en el directorio <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sh</span> (conviene guardar una copia si se fuera a utilizar también en Linux).</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">De esta manera, para poder utilizar la herramienta, bastará con desplazarnos desde Terminal al directorio sh, y lanzar <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">DownloadUpdates_OSX.sh</span>, bien sin parámetros, o bien con los mismos parámetros que usaríamos para utilizar el script original de Linux. Por ejemplo:</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">cd ./wsusoffline/sh</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">./DownloadUpdates_OSX wxp esn /makeiso /dotnet </span></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Puesto que no hemos modificado ninguno de los ficheros originales de WUS Offline Update, podremos seguir usando los mismos binarios y scripts personalizados con versiones posteriores, siguiendo el mismo proceso final de instalación.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-57802052845371784912011-06-28T18:14:00.009+02:002011-07-05T10:26:37.896+02:00Cómo usar el DNI electrónico para iniciar sesión en Mac OS X<div style="text-align: justify;">En <a href="http://kounch-mac.blogspot.com/2011/02/compilacion-de-opendnie-para-mac-os-x.html">entradas anteriores</a> ya hemos hablado de las posibilidades que ofrecen las últimas versiones (por el momento en pruebas) del software <a href="http://www.opensc-project.org/opensc">OpenSC</a> y <a href="http://opendnie.cenatic.es/wiki/">OpenDNIe</a> para usar el DNI electrónico en Mac OS X.</div><div style="text-align: justify;">Este sistema operativo dispone, desde la versión 10.4, de soporte para utilizar tarjetas inteligentes como medio de autenticación de los usuarios. Es decir, la posibilidad de "enlazar" una cuenta de usuario del sistema con una tarjeta inteligente que cumpla unos requisitos mínimos, a saber:</div><div style="text-align: justify;"></div><ul><li>La tarjeta debe ser capaz de firmar utilizando una clave pública</li>
<li>La tarjeta debe ser compatible con alguno de los módulos de acceso a tarjeta inteligente (<a href="http://smartcardservices.macosforge.org/trac/wiki/tokend">tokend</a>) instalados en el sistema</li>
</ul><br />
<div style="text-align: justify;">Por definición y diseño, la tarjeta del DNI electrónico cumple con el primer requisito y, por otra parte, en las últimas versiones de OpenDNIe/OpenSC se ha mejorado bastante el módulo tokend de OpenSC en su integración con el DNIe, hasta el punto de que ya es posible acceder a los certificados de autenticación y firma, y por tanto se puede utilizar para el acceso al sistema.</div><div style="text-align: justify;"></div><a name='more'></a>A continuación explicaremos los pasos a seguir para configurar localmente un usuario de acceso a un sistema Mac OS X.<br />
<div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: large;">Requisitos:</span></div><div style="text-align: justify;"></div><ul><li style="text-align: justify;">Mac OS X 10.6.x (aunque se indica dónde mirar cómo configurar versiones anteriores)</li>
<li style="text-align: justify;">Lector de DNI electrónico</li>
<li style="text-align: justify;">DNI electrónico de la persona cuyo usuario se va a configurar</li>
<li style="text-align: justify;">OpenDNIe/OpenSC instalado, bien <a href="http://kounch-mac.blogspot.com/2011/02/compilacion-de-opendnie-para-mac-os-x.html">compilado por nosotros mismos</a>, bien descargando una versión compilada (se puede usar <a href="http://www.kounch.com/download/opendnie/">la mía</a> o una de <a href="http://www.opensc-project.org/downloads/nightly/">las últimas versiones de prueba SVN oficiales</a>). En este caso hemos utilizado la versión SVN 400 obtenida el 22 de Junio de 2011.</li>
</ul><span class="Apple-style-span" style="font-size: large;">Instrucciones:</span><br />
<div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Una vez tengamos el sistema operativo con OpenDNIe instalado, y tengamos elegida la cuenta de usuario que se quiera asociar a un DNI electrónico concreto, seguimos estos pasos para identificar el DNI electrónico:</div><div style="text-align: justify;"></div><ul><li style="text-align: justify;">Abrimos una sesión de terminal local</li>
<li style="text-align: justify;">Conectamos el lector de DNI electrónico al Mac</li>
<li style="text-align: justify;">Insertamos el DNI electrónico en el lector (!ojo! ver <b>Nota 2</b> más abajo sobre desbloqueo del DNIe en acceso a llaveros)</li>
<li style="text-align: justify;">Escribimos el siguiente comando para obtener las cadenas asociadas a los certificados del DNI electrónico:</li>
</ul><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sc_auth hash</span></div><div style="text-align: justify;">Esto producirá un listado similar al siguiente:</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">8D4KJH56445B2G32J23J5JHGD7872JH83456C5A9 KprivAutenticacion</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">5B4LK34MLK0957387CBXVGHD8276309FKJ6F51A2 KprivFirmaDigital</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">CCBXVGHD8276309FKJ6F51AH7CB749300C8B0080 com.apple.systemdefault</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">812A762A5817CBXVGHD8276309FKJ6F51A11205A com.apple.kerberos.kdc</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">C9CBXVGHD8276309FKJ6F51ADSD9873SDKJB0080 com.apple.systemdefault</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">812A762A58CBXVGHD8276309FKJ6F51ACC11205A com.apple.kerberos.kdc</span></div><div style="text-align: justify;"></div><ul><li style="text-align: justify;">Tomamos nota de la cadena asociada a KprivAutenticación, que es el certificado de autenticación del DNI electrónico (en este ejemplo sería <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">8D4KJH56445B2G32J23J5JHGD7872JH83456C5A9</span>).</li>
<li style="text-align: justify;">Asociamos la cadena al nombre corto (login) del usuario del Mac que queremos que se identifique con el DNI electrónico (en este ejemplo se llama <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">usuariodni</span>), usando el siguiente comando (¡ojo! se requieren permisos de administrador local):</li>
</ul><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sudo sc_auth accept -u </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><i>usuariodni</i></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> -h </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><i>8D4KJH56445B2G32J23J5JHGD7872JH83456C5A9</i></span><br />
<br />
<div style="text-align: justify;"><b>Aclaración</b>: <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><i>usuariodni</i></span> es un nombre de ejemplo. Hay que cambiarlo por el nombre corto (login) del usuario del Mac que queramos que utilice ese DNIe para identificarse.<br />
<br />
Si queremos comprobar que se ha registrado bien la cadena con el login del usuario, podemos usar un comando como<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sc_auth list -u </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><i>usuariodni</i></span><br />
que debería devolvernos, al menos, la cadena que habíamos registrado asociada al DNIe.<br />
<br />
Ahora, estando en la ventana de inicio de sesión de Mac OS X</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4dKpIvw82SzSbPs2plZIJmjlMlJOV6TZ1kx97_PvGAlhcYO4_G3AVYoEo2bVDrlRbQlya3IDGmNkShCzt3zMSghSXXaYpVsMhDhDzXdz9_q08kWGb1hQhPCi-Xeoxbc0EJ0AN4T_KvoM/s1600/login.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="273" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4dKpIvw82SzSbPs2plZIJmjlMlJOV6TZ1kx97_PvGAlhcYO4_G3AVYoEo2bVDrlRbQlya3IDGmNkShCzt3zMSghSXXaYpVsMhDhDzXdz9_q08kWGb1hQhPCi-Xeoxbc0EJ0AN4T_KvoM/s320/login.png" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">Si se conecta el lector de DNI, y se inserta la tarjeta, cambiará a esta otra forma:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj2SaiSDDvucq_tc_2o5otgn-txgL3Q7su6r69lONtEIE4HcVSgf1V1CF_iXsv-Yucr0NI-MjUxCZWuT9LuY-BcOELLyGCa8avtL7ikoGsoNbpVVdY8u3j6rL6beZVJCYgWW850mckZwk/s1600/login2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj2SaiSDDvucq_tc_2o5otgn-txgL3Q7su6r69lONtEIE4HcVSgf1V1CF_iXsv-Yucr0NI-MjUxCZWuT9LuY-BcOELLyGCa8avtL7ikoGsoNbpVVdY8u3j6rL6beZVJCYgWW850mckZwk/s320/login2.png" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: justify;">Ahora, para iniciar sesión, se deberá introducir el PIN del DNI electrónico. La primera vez que el usuario lo haga, aparecerá una ventana como la siguiente:</div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsFfYL4GCxT0TrlmHZp6Bvxg0bQsR7hgdjtZfRZLMwyPHmQAjCgKAq6LmJMKls8NOvJCJFMZ-Cbl5vWAGHHFRD_mesoVnziB6ozkKdWDFc__QO1Ih-vS8NvwX3r__F8ufFjXa47uQzm38/s1600/login3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsFfYL4GCxT0TrlmHZp6Bvxg0bQsR7hgdjtZfRZLMwyPHmQAjCgKAq6LmJMKls8NOvJCJFMZ-Cbl5vWAGHHFRD_mesoVnziB6ozkKdWDFc__QO1Ih-vS8NvwX3r__F8ufFjXa47uQzm38/s400/login3.png" width="400" /></a></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Esta es una limitación del sistema operativo, que utiliza las credenciales de autenticación para bloquear y desbloquear el llavero de certificados por defecto del usuario.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Si eligiéramos la opción de "Actualizar la contraseña del llavero", el sistema utilizará la clave pública del DNIe para sustituir la anterior contraseña que utilizaba el usuario. Esto plantea dos problemas:</div><div style="text-align: justify;"></div><ul><li style="text-align: justify;">Si el usuario accediera sin utilizar el DNIe y usando su contraseña antigua, no tendría acceso al llavero.</li>
<li style="text-align: justify;">Si cambiasen los certificados del DNIe (por renovación o por extravío de la tarjeta, por ejemplo), también se perdería el acceso al llavero.</li>
</ul><div style="text-align: justify;">Por lo tanto, probablemente sea más útil continuar con el inicio de sesión y seguir utilizando la contraseña antigua para desbloquear el llavero.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><b><span class="Apple-style-span" style="color: red;"><span class="Apple-style-span" style="background-color: #fff2cc;">Nota muy importante:</span></span></b><span class="Apple-style-span" style="background-color: #fff2cc;"> Según me indican en los comentarios, salvo que se haya activado la opción de actualizar la contraseña del llavero, </span><b><span class="Apple-style-span" style="background-color: #fff2cc;">no iniciar el ordenador con el DNIe insertado</span></b><span class="Apple-style-span" style="background-color: #fff2cc;"> porque el sistema intentará enviar como PIN la contraseña del usuario (el del llavero de sesión)... y</span><b><span class="Apple-style-span" style="background-color: #fff2cc;"> bloqueará el DNIe al tercer intento</span></b><span class="Apple-style-span" style="background-color: #fff2cc;">.</span></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Esto es: primero se arranca el Mac; y luego -y únicamente luego-, cuando aparezca la ventana de petición de login, se introduce el DNIe en el lector</div><div><div style="text-align: justify;"><br />
</div></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">En el caso de sistemas operativos más antiguos, es necesario hacer más cambios tal y como se indica en el siguiente documento de soporte de Apple: <a href="http://support.apple.com/kb/TA24244">http://support.apple.com/kb/TA24244</a>. El texto es para Mac OS X 10.4, pero también es válido para la versión 10.5, donde la mayoría de los cambios de configuración ya no son necesarios.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">En <a href="http://support.apple.com/kb/TA24244">ese mismo documento</a> se indica un procedimiento por el que asociar atributos de cuentas de un directorio (LDAP, etc.) con atributos de la tarjeta para la validación en sistemas centralizados.<br />
<br />
<b>Nota 2</b>: Tras haber instalado OpenSC y tokend, con la versión de OpenDNIe/OpenSC que se ha probado, la primera vez que se inserta el DNIe, aunque aparece en Acceso a llaveros y el sistema detecta la tarjeta, los certificados de firma y autenticación no se ven en Acceso a llaveros y, si se lanza el comando <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sc_auth hash</span>, aparece un mensaje de error como el siguiente:<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">security: SecKeychainSearchCopyNext: CSSMERR_DL_MISSING_VALUE</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">security: SecKeychainSearchCopyNext: CSSMERR_DL_MISSING_VALUE</span><br />
<br />
Para corregirlo, basta con ir a acceso a llaveros, elegir el DNI electrónico, y pulsar en el candado<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDbSgKwOcMyB-q3DLL5esji0phUUnwJy0QmjYzOQNmWIDDyKKpycT_eqjUHelbN4RHMer3wszPr8zKrko1DMZINj_b4gnjRY_sLcUcKEH-FdJrWA6qA6f6nuth4vOtBq_JRd8SgC8XE1U/s1600/Captura+de+pantalla+2011-06-30+a+las+21.53.51.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDbSgKwOcMyB-q3DLL5esji0phUUnwJy0QmjYzOQNmWIDDyKKpycT_eqjUHelbN4RHMer3wszPr8zKrko1DMZINj_b4gnjRY_sLcUcKEH-FdJrWA6qA6f6nuth4vOtBq_JRd8SgC8XE1U/s1600/Captura+de+pantalla+2011-06-30+a+las+21.53.51.png" /></a></div><div class="separator" style="clear: both; text-align: justify;">Tras introducir el PIN del DNI electrónico, si cerramos Acceso a llaveros y volvemos a abrirlo, aparecerán los certificados y claves en acceso a llaveros, y el comando <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sc_auth hash</span> funcionará correctamente. Parece ser que esto sólo hay que hacerlo la primera vez que insertemos un DNI electrónico, para cada DNIe que queramos usar.</div><div class="separator" style="clear: both; text-align: justify;">Es decir, si tenemos tres DNIe distintos para tres personas, será necesario desbloquear cada uno de ellos al menos una vez desde acceso a llaveros, antes de poder utilizarlo con <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sc_auth</span>.</div></div>Unknownnoreply@blogger.com13tag:blogger.com,1999:blog-4093323652903426539.post-47118167059283588172011-06-01T16:09:00.002+02:002011-06-29T16:53:30.252+02:00Adaptación de la aplicación eCoFirma a Mac OS X 10.6.7<div style="text-align: justify;">Tal y como v<a href="http://kounch-mac.blogspot.com/2011/03/adaptacion-de-la-aplicacion-de-cambio.html">imos que sucedía con la aplicación de cambio de PIN del DNIe,</a> parece que, en algunos casos, el soporte de la administración española a los usuarios de sistemas operativos distintos de Windows es más bien escaso.</div><div style="text-align: justify;">Hoy vamos a ver varias maneras de hacer utilizable la aplicación eCoFirma de firma de documentos, que se puede obtener oficialemente desde aquí:</div><div style="text-align: justify;"> <a href="http://oficinavirtual.mityc.es/javawebstart/soc_info/ecofirma/index.html">http://oficinavirtual.mityc.es/javawebstart/soc_info/ecofirma/index.html</a></div><div style="text-align: justify;">en la web del Ministerio de Industria, Turismo y Comercio.</div><div style="text-align: justify;"></div><a name='more'></a>Si seguimos los pasos naturales para usar la aplicación tal y como está, al menos en Mac OS X 10.6 (Snow Leopard), nos encontraremos que, aunque la aplicación se descarga correctamente y se inicia, la interfaz de usuario no se dibuja correctamente:<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirX4l51XXBESQqqTR-MHrmdwfvs3TX-kqg0UlGYcIfY7ztzZDLutIr3a-0-YrS3nMr5tVxhtGmsn-UNK_9_BhGyQiLYsIAYLjNpsi4EU6jBSrqTlsz_H1KApMuQMTCKu99Bddro4Z0qlM/s1600/Captura+de+pantalla+2011-06-01+a+las+15.26.05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="501" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirX4l51XXBESQqqTR-MHrmdwfvs3TX-kqg0UlGYcIfY7ztzZDLutIr3a-0-YrS3nMr5tVxhtGmsn-UNK_9_BhGyQiLYsIAYLjNpsi4EU6jBSrqTlsz_H1KApMuQMTCKu99Bddro4Z0qlM/s640/Captura+de+pantalla+2011-06-01+a+las+15.26.05.png" width="640" /></a></div><div style="text-align: justify;">De hecho, si miramos, por ejemplo, <a href="http://oficinavirtual.mityc.es/javawebstart/soc_info/ecofirma/Manual%20de%20usuario%20aplicacion%20escritorio%20eCoFirma%20v1.2.1.pdf">el manual oficial</a>, observaremos que hay referencia a diferentes menús que no aparecen por ninguna parte.</div><div style="text-align: justify;">Tras investigar un poco, todo parece que es debido a la manera en que se han implementado los menús, de forma que no se ha tenido en cuenta la característica normal de Mac OS X, distinto de Windows, en que los menús no van incluídos dentro de las ventanas de los programas.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Para solucionarlo, tenemos varias vías opciones. La primera consiste en modificar el archivo de descarga que obtenemos desde la web oficial (<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">launcher_ecofirma.jnlp</span>), añadiendo una propiedad de Mac OS X que indica que el menú debe pintarse aparte, y no dentro de la ventana:</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Esto puede hacerse editando el archivo, por ejemplo con el editor por defecto de Mac OS X para texto (TextEdit), de la siguiente manera:</div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwen6L27aV5TiKEYBcGtt0GhzlgEuhoYmsYCD1PipGbP32z_sfyEg5qMtYQAHdL4aMMboGXkmpxqKiKD-04v4umLVEF7TTLWvCijorCrvAO3xQB6vB9Uym0RcsQMtjQeFQmGhuYnQ2oPc/s1600/Captura+de+pantalla+2011-03-21+a+las+11.44.51.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwen6L27aV5TiKEYBcGtt0GhzlgEuhoYmsYCD1PipGbP32z_sfyEg5qMtYQAHdL4aMMboGXkmpxqKiKD-04v4umLVEF7TTLWvCijorCrvAO3xQB6vB9Uym0RcsQMtjQeFQmGhuYnQ2oPc/s640/Captura+de+pantalla+2011-03-21+a+las+11.44.51.png" width="520" /></a></div><div style="text-align: justify;">Así, cada vez que se haga doble clic sobre el fichero modificado, la aplicación se verá correctamente:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjtPvthMr2MyapvfA6KAnWypK61y_jUfIPfxMQ8bwgl974ihOPaQKBwMOlq7kckzqdLolXpP1lVhyphenhyphencIgwcoMebHA6IoeOz5NsIa5oCwhMxl9Q9tWj3cIXK0RJq2ve4sxcI8aU2fq4SA30/s1600/Captura+de+pantalla+2011-06-01+a+las+15.27.33.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="499" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjtPvthMr2MyapvfA6KAnWypK61y_jUfIPfxMQ8bwgl974ihOPaQKBwMOlq7kckzqdLolXpP1lVhyphenhyphencIgwcoMebHA6IoeOz5NsIa5oCwhMxl9Q9tWj3cIXK0RJq2ve4sxcI8aU2fq4SA30/s640/Captura+de+pantalla+2011-06-01+a+las+15.27.33.png" width="640" /></a></div><div style="text-align: justify;">Al tratarse de un archivo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">.jnlp</span>, lo que sucede es que la implementación de Java en Mac OS X realiza una descarga de los archivos necesarios desde el servidor del Ministerio en la caché de Java, y nos ofrece la posibilidad de crear un icono de aplicación en el lugar que nosotros deseemos del disco duro, que servirá como acceso directo para lanzarla la próxima vez.</div><div style="text-align: justify;">Si optamos por esta alternativa, borrando el archivo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">.jnlp</span> descargado, la solución anterior no nos vale. En este caso tendremos que acceder al interior del paquete de la aplicación (menú contextual "Mostrar contenido del paquete"), y editar el archivo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Info.plist</span> correspondiente para añadir la propiedad <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">useScreenMenuBar</span>, bien con un editor de texto:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuN3l5JLT3oYVzmWJSyEMEQ7Z7LUZC69vlM8sWs-8BaAljCu4eoWWlf5eq5wRBYRB-ojFwEy77t-JrQMylBqMc8KTDIMQMufQwKeB1sRXBKUkG1y7Mskkbnqb2GH_MiUXxZhnp5dJOQcU/s1600/Captura+de+pantalla+2011-03-21+a+las+12.26.34.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="467" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuN3l5JLT3oYVzmWJSyEMEQ7Z7LUZC69vlM8sWs-8BaAljCu4eoWWlf5eq5wRBYRB-ojFwEy77t-JrQMylBqMc8KTDIMQMufQwKeB1sRXBKUkG1y7Mskkbnqb2GH_MiUXxZhnp5dJOQcU/s640/Captura+de+pantalla+2011-03-21+a+las+12.26.34.png" width="640" /></a></div><div style="text-align: justify;">Bien con el editor de propiedades de las herramientas de desarrollo, si las tuviéramos instaladas:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv8aadW3XotYhKpAjyc7hDsx_RwD6cmgX1TIDnESHJvzOfWHuf_GrRfDXPlDWClISagYvIzhdD58c4NPHZ5cQHb8ecmqjXBo-KYTPXWSjE1OLbvEsGAhstpmUp8OWUNGeqcCVykx8AeVE/s1600/Captura+de+pantalla+2011-03-21+a+las+11.37.37.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="601" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv8aadW3XotYhKpAjyc7hDsx_RwD6cmgX1TIDnESHJvzOfWHuf_GrRfDXPlDWClISagYvIzhdD58c4NPHZ5cQHb8ecmqjXBo-KYTPXWSjE1OLbvEsGAhstpmUp8OWUNGeqcCVykx8AeVE/s640/Captura+de+pantalla+2011-03-21+a+las+11.37.37.png" width="640" /></a></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">La tercera opción que tenemos, consiste en hacer lo mismo que <a href="http://kounch-mac.blogspot.com/2011/03/adaptacion-de-la-aplicacion-de-cambio.html">ya explicamos para la aplicación de cambio PIN de DNIe</a>, crear nuestra propia aplicación en local. La diferencia con lo que ocurrió aquella vez consiste en que ahora los archivos no están incluidos ni con la descarga original (es únicamente el archivo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">.jnlp</span>), ni dentro del icono de aplicación que nos crea el sistema, y tendremos que obtenerlos por nuestra cuenta.</div><div style="text-align: justify;">La ventaja de este últino método, es que tendremos una aplicación que se comportará como cualquier otra nativa del sistema, pudiendo hacer por ejemplo una copia de seguridad completa de la misma (cosa que no sucede con la otra, ya que los archivos se encuentran en la caché de Java). </div><div style="text-align: justify;">La desventaja es que la aplicación no gozará de actualizaciones automáticas y será necesario comprobar de vez en cuando la <a href="http://oficinavirtual.mityc.es/javawebstart/soc_info/ecofirma/index.html">página oficial</a> para ver si hay nuevas versiones.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">La lista de archivos a descargar se puede obtener analizando el archivo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">.jnlp</span>, y sus nombres (para la versión 1.2.1) son los siguientes:</div><div style="text-align: justify;"></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">eCoFirma-1.2.1.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">ClienteXADES-1.0.7.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">MITyCLibPolicy-1.0.7.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">MITyCLibXADES-1.0.7.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">MITyCLibTrust-1.0.7.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">MITyCLibCert-1.0.7.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">MITyCLibCert-1.0.7-mscapi5.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">MITyCLibOCSP-1.0.7.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">MITyCLibTSA-1.0.7.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">ClientesConf-1.0.7.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">MITyCLibAPI-1.0.8.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">bcprov-jdk15-1.43.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">bcmail-jdk15-1.43.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">bctsp-jdk15-1.43.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">commons-codec-1.3.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">commons-httpclient-3.0.1.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">commons-logging-1.1.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">commons-lang-2.4.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">log4j-1.2.14.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">swing-layout-1.0.3.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">xmlsec-1.4.2-ADSI-1.0.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">jdic-0.9.4-ADSI-1.0.2.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">jss-4.2.5.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">MimeType-1.0.jar</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">itext-2.1.4.jar</span></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Una vez descargados, tendremos que abrir "Jar Bundler" incluída en las herramientas de desarrollo de Apple, que se pueden obtener gratuitamente (hay que registrarse) en la <a href="http://developer.apple.com/">web de desarrolladores de Apple</a> (versiones anteriores a XCode 4), o bien (XCode 4) <a href="http://itunes.apple.com/es/app/xcode/id422352214?mt=12">pagando en la Mac App Store</a> o suscribiéndose al programa de pago de desarrollador de Mac OS.</div><div style="text-align: justify;">Añadimos como archivo principal "<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">eCoFirma-1.2.1.jar</span>" y nos aseguramos de que están marcadas las opciones "Use Macintosh Menu Bar" (el equivalente a la propiedad que habíamos puesto a mano en los dos casos anteriores) y que la versión de JVM sea "1.5+"y, si queremos, añadimos una imagen para usar como icono.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUkW_SQZVeA1FAM3SxXIB_Vc7KvCDwr8lCBQ2Oyy-L7gpouIbPODb3BShClBa1dv-WQZ0hSfYza3Ypsl71_kYYwVjURpS6JtBs7i39EnbFVCxgKRKd1-iRP5_2W0KH7VJLJ-kHE4wAbr4/s1600/Captura+de+pantalla+2011-03-21+a+las+11.38.05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="372" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUkW_SQZVeA1FAM3SxXIB_Vc7KvCDwr8lCBQ2Oyy-L7gpouIbPODb3BShClBa1dv-WQZ0hSfYza3Ypsl71_kYYwVjURpS6JtBs7i39EnbFVCxgKRKd1-iRP5_2W0KH7VJLJ-kHE4wAbr4/s400/Captura+de+pantalla+2011-03-21+a+las+11.38.05.png" width="400" /></a></div><div class="separator" style="clear: both; text-align: justify;">Añadimos a la lista de archivos todos los que nos habíamos descargado antes.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_yb4bB7WTBI0HrZjv9-2QhM2QY7CAb7v0EYf70tunDdOHh-gOclaaIdGrOVbXo_AU0ch0MiCJQt6zbzFLgE0uyR_68M40qE6Jj0lqmIK1FTogSezqRf_8tN6ZyPKxF2RO6VJWo_1SQzA/s1600/Captura+de+pantalla+2011-03-21+a+las+11.38.21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_yb4bB7WTBI0HrZjv9-2QhM2QY7CAb7v0EYf70tunDdOHh-gOclaaIdGrOVbXo_AU0ch0MiCJQt6zbzFLgE0uyR_68M40qE6Jj0lqmIK1FTogSezqRf_8tN6ZyPKxF2RO6VJWo_1SQzA/s640/Captura+de+pantalla+2011-03-21+a+las+11.38.21.png" width="460" /></a></div> Configuramos el tamaño de la pila con un mínimo de 128 y un máximo de 512 (estos datos los hemos obtenido también analizando el archivo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">.jnlp</span> original). Finalmente, marcamos la opción "Set working directory to inside of application package" y pulsamos en el botón para crear la aplicación.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTGjqloR9PbHGAkyHbMvm05heQla1e05hHBM1VmAkrkwl5mmfaWTvflchMDL0_FgKdqnmH-2uVBH7YaqZ-MzrzMJP12f6vYw0CTmhKwsbouKFFhpiH5rtft4icgL6ra1EY_kn7X8C_2pY/s1600/Captura+de+pantalla+2011-03-21+a+las+11.38.31.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="617" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTGjqloR9PbHGAkyHbMvm05heQla1e05hHBM1VmAkrkwl5mmfaWTvflchMDL0_FgKdqnmH-2uVBH7YaqZ-MzrzMJP12f6vYw0CTmhKwsbouKFFhpiH5rtft4icgL6ra1EY_kn7X8C_2pY/s640/Captura+de+pantalla+2011-03-21+a+las+11.38.31.png" width="640" /></a></div><div style="text-align: justify;">Ahora, tras guardar la nueva aplicación en el sitio que queramos dentro del disco duro, veremos si la lanzamos que todo aparece como debería ser, incluyendo los menús.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXfmEZbT1r7xDoUWu9QHcLZDc8JykJT_-4S_hu-v5kVALQZgGuGCyaYnZQJTMYFJmXyhGN8h1ZOaRVEcKgfgYAcZXNhrqvfH2X8JeWZbVvV7AMNffTZ8yUdfWRevzw6Oz4DlJGCdsCbgg/s1600/Captura+de+pantalla+2011-06-01+a+las+15.28.19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="428" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXfmEZbT1r7xDoUWu9QHcLZDc8JykJT_-4S_hu-v5kVALQZgGuGCyaYnZQJTMYFJmXyhGN8h1ZOaRVEcKgfgYAcZXNhrqvfH2X8JeWZbVvV7AMNffTZ8yUdfWRevzw6Oz4DlJGCdsCbgg/s640/Captura+de+pantalla+2011-06-01+a+las+15.28.19.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: justify;">Si alguien estuviera interesado en tener una copia de la aplicación ya creada según este último método, por favor que lo indique en los comentarios, y prepararé una para descarga.</div><div class="separator" style="clear: both; text-align: justify;"><br />
</div><div class="separator" style="clear: both; text-align: justify;"><br />
</div><div class="separator" style="clear: both; text-align: justify;"><b>Actualización</b>: Tras recibir varias peticiones, he dejado una copia para descarga en el siguiente enlace: <a href="http://www.kounch.com/download/eCoFirma.zip">http://www.kounch.com/download/eCoFirma.zip</a></div><div class="separator" style="clear: both; text-align: justify;">Basta con descomprimir el archivo y copiar la aplicación al lugar que deseemos del disco duro (lo normal es usar la carpeta Aplicaciones).</div><div style="text-align: justify;"><br />
</div>Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-4093323652903426539.post-76746258734083615032011-05-23T12:39:00.001+02:002011-05-23T12:42:35.104+02:00Instalando los certificados de FNMT en un iPhone<div style="text-align: justify;">Sí, es posible utilizar los certificados emitidos por la FNMT desde el navegador Safari de un iPhone, sin embargo, se debe de tener en cuenta los riesgos que esto implica; no es posible (o al menos yo no he encontrado la opción ni ninguna referencia en los manuales) proteger con contraseña, una vez en el teléfono, el acceso a las claves privadas.</div><div style="text-align: justify;">Por tanto, cualquier persona a la que permitamos acceder al móvil y a su navegador podría suplantarnos accediendo a cualquier página web que lo soporte. Así que, si alguien decide hacer esto, debería tener un <b>cuidado extremo con permitir a nadie usar su teléfono móvil</b>, además de asegurarse de <b>utilizar una clave de bloqueo compleja (algo más que una clave numérica)</b>, y configurarlo para que se <b>bloquee de forma automática</b>.</div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Por esta razón, no recomendamos a nadie que siga estos pasos, salvo para algún tipo de uso experimental y temporal.</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Una vez realizada la advertencia, empezamos con las instrucciones.</div></div><div><div style="text-align: justify;"></div><a name='more'></a></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: large;"><br />
</span><br />
<span class="Apple-style-span" style="font-size: large;">Creación de un perfil de configuración para iPhone</span></div><div style="text-align: justify;">Lo que vamos a hacer es usar el mismo sistema que se se utiliza para instalar credenciales de acceso para una empresa, (para Exchange, VPN, etc.). Para ello, necesitamos tener instalada la "Utilidad de configuración iPhone" que se puede obtener de forma gratuita desde la web de soporte de Apple: <a href="http://support.apple.com/kb/DL851?viewlocale=es_ES">http://support.apple.com/kb/DL851?viewlocale=es_ES</a><br />
<br />
</div></div><div><div style="text-align: justify;">Una vez instalada, necesitaremos también lo siguiente:<br />
- <a href="http://www.cert.fnmt.es/certs/ACRAIZFNMTRCM.crt">Certificado raíz clase 2 CA de FNMT (FNMT Clase 2 CA)</a><br />
- <a href="http://www.cert.fnmt.es/content/pages_std/certificados/FNMTClase2CA.cer">Certificado raíz de la RC-FNMT (AC RAIZ FNMT RCM)</a><br />
- Certificado y clave privada de la identidad que queramos usar, asociados a una persona y un DNI concretos (<a href="http://www.cert.fnmt.es/index.php?cha=cit&sec=4&lang=es">aquí</a> se explica cómo obtenerlo)</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">En mi caso, tengo todo en el sistema de llaveros (keychain) de Mac OS X, así que los exportaremos desde ahí.</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Comenzamos con los certificados raíz. Habrá que exportar cada uno por separado a un archivo .cer distinto.</div></div><div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKK3u_bUl_PsrIkGThYJ-nUZvbU_LFzfUrsBBLpisFlPFzcCGtf1877V3mUvxbf5KTWsU_mCl_CkC0iltbZcpjwBbM2bMSHmISH7__kPWBmDyE9Dd930HXZkBgL5RiHgt4mIk9wlAMCsM/s1600/Captura+de+pantalla+2011-05-23+a+las+10.42.29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKK3u_bUl_PsrIkGThYJ-nUZvbU_LFzfUrsBBLpisFlPFzcCGtf1877V3mUvxbf5KTWsU_mCl_CkC0iltbZcpjwBbM2bMSHmISH7__kPWBmDyE9Dd930HXZkBgL5RiHgt4mIk9wlAMCsM/s320/Captura+de+pantalla+2011-05-23+a+las+10.42.29.png" width="320" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjuMKRqauB2KI3YZbPz7OaIAsNpJUYkZE0dePpX9Bb_RL0JIRRLUWJ5qCWZQbQW5O5ZTZj7iPvynX2vq2I19J8uUTDJ7Xq5YLNWaYD7SkTzPYuMEeMCMwWS8DZK_h8JrshuvyCn5IXMmY/s1600/Captura+de+pantalla+2011-05-23+a+las+10.42.09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="119" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjuMKRqauB2KI3YZbPz7OaIAsNpJUYkZE0dePpX9Bb_RL0JIRRLUWJ5qCWZQbQW5O5ZTZj7iPvynX2vq2I19J8uUTDJ7Xq5YLNWaYD7SkTzPYuMEeMCMwWS8DZK_h8JrshuvyCn5IXMmY/s320/Captura+de+pantalla+2011-05-23+a+las+10.42.09.png" width="320" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf8lX_krMvB1syopobq7_2qUa_hqlakOkMM9HimXtEB090CejSCJEvjVnSfP64c-qgAP3uGKZPyPR_8nPXvSOn4-HhHdvyS_7VV27pfTl1xY66mxKVp2YQbggvqVwGPgz_6-NLt2zPXGQ/s1600/Captura+de+pantalla+2011-05-23+a+las+10.42.41.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="119" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf8lX_krMvB1syopobq7_2qUa_hqlakOkMM9HimXtEB090CejSCJEvjVnSfP64c-qgAP3uGKZPyPR_8nPXvSOn4-HhHdvyS_7VV27pfTl1xY66mxKVp2YQbggvqVwGPgz_6-NLt2zPXGQ/s320/Captura+de+pantalla+2011-05-23+a+las+10.42.41.png" width="320" /></a></div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Después exportamos los certificados y claves privadas asociadas a mi identidad, usando un archivo .p12 y poniendo una contraseña segura. <b>NUNCA se debería exportar esta información a un archivo sin contraseña.</b></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFU2GNYyAGe5fvijf1ZhEQNDkyDBt-gUepjkLZu2I6g4FVcAVYJMKjiADQGNfXCceN9_fHjPYqC8gdiW7cInm6iQf6zJ0uzITDRp6nZcWeFjK43UsbCe4DD7VRKc9HKpSQoHLU2pxQ5q8/s1600/Captura+de+pantalla+2011-05-23+a+las+10.43.30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="339" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFU2GNYyAGe5fvijf1ZhEQNDkyDBt-gUepjkLZu2I6g4FVcAVYJMKjiADQGNfXCceN9_fHjPYqC8gdiW7cInm6iQf6zJ0uzITDRp6nZcWeFjK43UsbCe4DD7VRKc9HKpSQoHLU2pxQ5q8/s640/Captura+de+pantalla+2011-05-23+a+las+10.43.30.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim4wY4UGYL7nPhlMxe-jIiaeuzOk-j_rDCx-og6coO-KdZvIHkUndSxT8c8SriRwp-fJwGyhTSVCsxjjDm3wLOQ50J8tz4cRMHecu-4aBaP8q1ABAafUJ8QP0-Mz1IGiviuvZOcFmWWeY/s1600/Captura+de+pantalla+2011-05-23+a+las+10.47.25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="119" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim4wY4UGYL7nPhlMxe-jIiaeuzOk-j_rDCx-og6coO-KdZvIHkUndSxT8c8SriRwp-fJwGyhTSVCsxjjDm3wLOQ50J8tz4cRMHecu-4aBaP8q1ABAafUJ8QP0-Mz1IGiviuvZOcFmWWeY/s320/Captura+de+pantalla+2011-05-23+a+las+10.47.25.png" width="320" /></a></div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Ahora abrimos la Utilidad Configuración iPhone y creamos un nuevo perfil de configuración.</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Dentro de las opciones disponibles, elegiremos la categoría "Credenciales", e iremos añadiendo los certificados raíz y luego las credenciales de la identidad a usar.</div></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMepM7Mo3kun01zhLsvicPk1v5CN9mimxxLmCCEBtZEXSbMjNPr_AM-t_T098sHpy2AqLT3u_OXi7lGt6-e2CdlY49DzPHK6Q2HfJr_Fww17SHDYuAUy1g2U_nAXNY8vanBF45sMCR7fU/s1600/Captura+de+pantalla+2011-05-23+a+las+10.43.39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="441" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMepM7Mo3kun01zhLsvicPk1v5CN9mimxxLmCCEBtZEXSbMjNPr_AM-t_T098sHpy2AqLT3u_OXi7lGt6-e2CdlY49DzPHK6Q2HfJr_Fww17SHDYuAUy1g2U_nAXNY8vanBF45sMCR7fU/s640/Captura+de+pantalla+2011-05-23+a+las+10.43.39.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1ktLQhKY-pmx_6AFbIH020_3Jp_qvDtUdu6xLDHswxhjZpPLJYIuvYNmJPAmZp8avwELduNbljAgqw9PV4ubRPh9NjQU1uGIvU8WqymvEO6dog5bfOSNWLKSRlMlqDHDBpL0hyMjT-Z0/s1600/Captura+de+pantalla+2011-05-23+a+las+10.44.09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="442" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1ktLQhKY-pmx_6AFbIH020_3Jp_qvDtUdu6xLDHswxhjZpPLJYIuvYNmJPAmZp8avwELduNbljAgqw9PV4ubRPh9NjQU1uGIvU8WqymvEO6dog5bfOSNWLKSRlMlqDHDBpL0hyMjT-Z0/s640/Captura+de+pantalla+2011-05-23+a+las+10.44.09.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: large;">Instalación del perfil</span></div><div style="text-align: justify;">Una vez añadidos todos los certificados y claves necesarios, exportamos a un mensaje de correo la configuración. También sería posible, por ejemplo, exportar la configuración a un fichero y colgar este en una página web pero, como ya tengo configuradas cuentas de correo en el teléfono, esto es más rápido y cómodo.</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Ahora abrimos el mensaje de correo en el teléfono y pulsamos sobre el fichero de configuración adjunto. Esto lanzará automáticamente la app de ajustes que iniciará el proceso de instalación del perfil de configuración.</div></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinBpp_L1BAYLs6TNJ3v3cxO7ckBDmyqI-BSTwm8yydgYyx7lfXqq5bTNkh2L7j0gTbq7POiC9-SLEOrj3EDjUTi744rcQgwWGGIvbU5US9W-wnoGjzkrTKNRuc6wJt0-3AhW7L3BJ-DFU/s1600/IMG_1578.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinBpp_L1BAYLs6TNJ3v3cxO7ckBDmyqI-BSTwm8yydgYyx7lfXqq5bTNkh2L7j0gTbq7POiC9-SLEOrj3EDjUTi744rcQgwWGGIvbU5US9W-wnoGjzkrTKNRuc6wJt0-3AhW7L3BJ-DFU/s320/IMG_1578.PNG" width="213" /></a></div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Tras comprobar que el perfil es el correcto, pulsamos en instalar.</div></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihlS267qU-xQFPreDzF_Mz0ujl7FzHYEeucMlkgiBo_kTbhDDoM3RZmPxAKdeY4URL0mKmRDsKU9qdAE6tInBoUGXJUGZ26qr86wjP3x62LtUwFbRbX5Yw5YB7KzM4_dwtcTr5lJNKv8c/s1600/IMG_1579.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihlS267qU-xQFPreDzF_Mz0ujl7FzHYEeucMlkgiBo_kTbhDDoM3RZmPxAKdeY4URL0mKmRDsKU9qdAE6tInBoUGXJUGZ26qr86wjP3x62LtUwFbRbX5Yw5YB7KzM4_dwtcTr5lJNKv8c/s320/IMG_1579.PNG" width="213" /></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGRdT0kEil3Dt3IJsKeWwrrHbPpaZ3NEwY_uNCAN4wgiOj10-WBJjTVv-WzkG7RVqbycvB1leAAfHrxrssmppQnSeietwLIF3oA6mivg4BqXF9gDOLbSIJtVInbE6pNfinElAn4zXXLLU/s1600/IMG_1580.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGRdT0kEil3Dt3IJsKeWwrrHbPpaZ3NEwY_uNCAN4wgiOj10-WBJjTVv-WzkG7RVqbycvB1leAAfHrxrssmppQnSeietwLIF3oA6mivg4BqXF9gDOLbSIJtVInbE6pNfinElAn4zXXLLU/s320/IMG_1580.PNG" width="213" /></a></div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Se nos informa de los certificados que se instalarán.</div></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj37CJQYpq1ikD6opqdGVF99wSHjEEoxsUQZeydFDLKY42v5he0dmv0XB0t5TErGo1pUDDfI6D8cxVNgUmGAN7SNMmNVsPntQY7a4l_29ZJmWQbRbSs6EsBbjTBTor1eQ9V5j2aoncikGU/s1600/IMG_1581.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj37CJQYpq1ikD6opqdGVF99wSHjEEoxsUQZeydFDLKY42v5he0dmv0XB0t5TErGo1pUDDfI6D8cxVNgUmGAN7SNMmNVsPntQY7a4l_29ZJmWQbRbSs6EsBbjTBTor1eQ9V5j2aoncikGU/s320/IMG_1581.PNG" width="213" /></a></div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Introducimos la clave de bloqueo del teléfono.</div></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVlbz8bUrsTZBBtF22FjfLN__JvYB5aPLma2ETDnTcXxGUv_xeyYfzToI1aVeJ-YmCwEsWMHJNZvHobnq9LKTsRCxJXmz8kw_7vgRFOMwU4iiHmnsa_ukRqUPuEgFYO7daeBavUD_NrUk/s1600/IMG_1582.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVlbz8bUrsTZBBtF22FjfLN__JvYB5aPLma2ETDnTcXxGUv_xeyYfzToI1aVeJ-YmCwEsWMHJNZvHobnq9LKTsRCxJXmz8kw_7vgRFOMwU4iiHmnsa_ukRqUPuEgFYO7daeBavUD_NrUk/s320/IMG_1582.PNG" width="213" /></a></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Introducimos la contraseña que usamos al guardar antes el archivo .p12.</div></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA525xnFfF2uYGwgQhZvH5TlpM7T7gwsPBNfRLQnqZkIIAo3Oq_IMFYoY-wg76qLBUig8bDKxKzbQZzMlwx0ttQI8VUjIVDmQiKytqhUlcEB2rg_maW1AapAthzCDI56zO4PFMUQQ5AJE/s1600/IMG_1583.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA525xnFfF2uYGwgQhZvH5TlpM7T7gwsPBNfRLQnqZkIIAo3Oq_IMFYoY-wg76qLBUig8bDKxKzbQZzMlwx0ttQI8VUjIVDmQiKytqhUlcEB2rg_maW1AapAthzCDI56zO4PFMUQQ5AJE/s320/IMG_1583.PNG" width="213" /></a></div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Ya está. Ahora podremos usar los certificados. Notar que desde esta misma opción de la aplicación de ajustes podremos borrar el perfil en el futuro si así lo quisiéramos.</div></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjINAyRB-tI-YIFjykcHq3rNtUsA4O8nrj9NeQxfAJFB1wAd-Yp408HrJaC4hYD0aad2pPhWJ3oG5kENlEcmS7V5hLdyE1F63XTwoIWDFeq78pdfrZRPct7XCBnH6qsQReXKdawwdAcfoY/s1600/IMG_1584.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjINAyRB-tI-YIFjykcHq3rNtUsA4O8nrj9NeQxfAJFB1wAd-Yp408HrJaC4hYD0aad2pPhWJ3oG5kENlEcmS7V5hLdyE1F63XTwoIWDFeq78pdfrZRPct7XCBnH6qsQReXKdawwdAcfoY/s320/IMG_1584.PNG" width="213" /></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzVj7dxVg6fNJltLoJBi-ttFSzvH8-2XMB9V6jtW0tGZ8dnU-4_dlB1RUPTx9Abb5alx9l5W21qe5wSIycSW9-vbE2lm273yyjuEFiTBj9gk8fOSC-_lZVSbhqNqzpDPWHn2dXDPvgUQo/s1600/IMG_1585.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzVj7dxVg6fNJltLoJBi-ttFSzvH8-2XMB9V6jtW0tGZ8dnU-4_dlB1RUPTx9Abb5alx9l5W21qe5wSIycSW9-vbE2lm273yyjuEFiTBj9gk8fOSC-_lZVSbhqNqzpDPWHn2dXDPvgUQo/s320/IMG_1585.PNG" width="213" /></a></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Un ejemplo accediendo a la web de verificación del certificado de FNMT.</div></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJfAn5o4Gy1VmEq_M5PViLe89keR-O-Kxai4odMOjL3nHe1Hdyz0VvFp4LLlJMvLcV1aLWNg_zsk1QT3kJe3B3BSYIgQ460d0nAwEtz0RJDqrP6uSuDsHAog6_WRho-asXZamY28er4M/s1600/IMG_1587.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJfAn5o4Gy1VmEq_M5PViLe89keR-O-Kxai4odMOjL3nHe1Hdyz0VvFp4LLlJMvLcV1aLWNg_zsk1QT3kJe3B3BSYIgQ460d0nAwEtz0RJDqrP6uSuDsHAog6_WRho-asXZamY28er4M/s640/IMG_1587.PNG" width="640" /></a></div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: large;">Notas</span></div></div><div><div style="text-align: justify;">Es posible que haya problemas si se intentan utilizar directamente los archivos .der y .cer disponibles para descarga en la web de FNMT. Si así fuera, se puede solucionar importándolos a un llavero de Mac OS X y luego exportándolos de nuevo. Este proceso vuelve a empaquetar el certificado en un archivo, y suele corregir el fallo. Si no fuera así, se pueden exportar primero a formato .pem y luego volver a importar y exportar en formato .cer.</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Insistimos en el tremendo <b>riesgo que supone el que no se pueda proteger el acceso a la clave privada a través de una contraseña específica y depender únicamente de la contraseña de bloqueo del teléfono</b>.</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">No hemos podido probar qué sucede al intentar instalar varias identidades distintas, pero la documentación nos hace sospechar que sólo una de ellas funcionaría.</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Para más información se pueden consultar las páginas de Apple de recursos para el uso de iPhone en la empresa:</div></div><div><div style="text-align: justify;"><a href="http://www.apple.com/es/iphone/business/resources/">http://www.apple.com/es/iphone/business/resources/</a></div></div><div><div style="text-align: justify;"><a href="http://www.apple.com/iphone/business/resources/">http://www.apple.com/iphone/business/resources/</a></div></div><div><div style="text-align: justify;"><br />
</div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-64826262509608136202011-03-15T12:56:00.008+01:002011-06-28T18:23:11.286+02:00Adaptación de la aplicación de cambio de PIN del DNI Electrónico para Mac OS X 10.6<div style="text-align: justify;">De nuevo nos encontramos con que la solución de software oficial no funciona adecuadamente.<a href="http://www.dnielectronico.es/descargas/PKCS11_para_Sistemas_Unix/cambio_pin.html"> La aplicación que ofrece el portal del DNI electrónico para cambiar el PIN</a> se basa en un programa hecho en java, pero que utiliza por debajo una librería (<a href="http://www.musclecard.com/middle.html">JPC/SC</a>) que debe ser adecuada para el sistema operativo donde se utilice.</div><div style="text-align: justify;">En este caso, la librería que se incluye para Mac OS X sólo está compilada para arquitecturas PowerPC. Como la versión de java incluida a partir de Mac OS X 10.6 sólo está compilada para arquitectura Intel, el programa de cambio de PIN no funciona.</div><div style="text-align: justify;">Aparte, tenemos la cuestión de que lo que se ofrece como aplicación es un conjunto de archivos y un script de inicio que sólo funciona si es lanzado desde la terminal y estando dentro del directorio donde está el programa.</div><div style="text-align: justify;">Por lo tanto, vamos a explicar a continuación cómo compilar una versión de JPC/SC nativa para OS X 10.6 Intel, y ya de paso empaquetaremos la aplicación de Java con todo lo necesario, de una forma más amigable para los usuarios del sistema usando la herramienta Jar Bundler de Apple.<br />
<br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">He dejado disponible la aplicación generada </span><a href="http://www.kounch.com/download/padvirtual/"><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">aquí</span></a><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"> para quien no tenga los medios, los conocimientos o las ganas de seguir todos estos pasos.</span></div><a name='more'></a><span class="Apple-style-span" style="font-size: large;"></span><br />
<span class="Apple-style-span" style="font-size: large;"></span><br />
<span class="Apple-style-span" style="font-size: large;"></span><br />
<span class="Apple-style-span" style="font-size: large;"></span><br />
<span class="Apple-style-span" style="font-size: large;"></span><br />
<span class="Apple-style-span" style="font-size: large;"></span><br />
<span class="Apple-style-span" style="font-size: large;"></span><br />
<span class="Apple-style-span" style="font-size: large;"></span><br />
<span class="Apple-style-span" style="font-size: large;"><div style="text-align: justify;">Requerimientos previos</div></span><br />
<div style="text-align: justify;">Por supuesto, necesitaremos tener instaladas las herramientas de desarrollo de Apple, que se pueden obtener gratuitamente (hay que registrarse) en la <a href="http://developer.apple.com/">web de desarrolladores de Apple</a> (versiones anteriores a XCode 4), o bien (XCode 4) <a href="http://itunes.apple.com/es/app/xcode/id422352214?mt=12">pagando en la Mac App Store</a> o suscribiéndose al programa de pago de desarrollador de Mac OS.</div><div style="text-align: justify;">También será necesario tener instalada una versión de Java en el equipo. En este caso utilizamos la instalación Java 1.6 que ofrece Apple con el sistema.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: large;">Compilación de JPC/SC</span></div><div style="text-align: justify;">Descargamos el código fuente desde <a href="http://www.musclecard.com/middle.html">la web oficial</a>: <a href="http://www.musclecard.com/middleware/files/jpcsc-0.8.0-src.zip">http://www.musclecard.com/middleware/files/jpcsc-0.8.0-src.zip</a></div><div style="text-align: justify;">Tras descomprimirlo, tendremos que modificar los siguientes arhivos de configuración para que la librería se cree correctamente:</div><div style="text-align: justify;"><br />
</div><div style="text-align: left;"><b>Archivo </b><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><b>Config</b></span></div><div style="text-align: left;">Cambiar</div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">PCSCDIR=/usr/local/pcsc</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#PCSCDIR=/usr</span></div><div style="text-align: left;">por</div><div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#PCSCDIR=/usr/local/pcsc</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">PCSCDIR=/System/Library/Frameworks/PCSC.framework/Versions/Current</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">PCSCINCDIR=/System/Library/Frameworks/PCSC.framework/Versions/Current/Headers</span></div></div><div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#PCSCDIR=/usr</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home</span></div></div><div style="text-align: left;">Y cambiar</div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">JPCSCJAR_INSTALL_DIR=${DESTDIR}${INSTALL_DIR}/share/java</span></div><div style="text-align: left;">por</div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">JPCSCJAR_INSTALL_DIR=${DESTDIR}${INSTALL_DIR}/lib</span></div><div style="text-align: left;"><br />
</div><div style="text-align: left;"><b>Archivo </b><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><b>Makefile<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> (dentro de s</span>rc/jpcsc<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">)</span></b></span></div><div style="text-align: left;">Cambiar</div><div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">INCLDEFS += -I${PCSCDIR}/include -I${PCSCDIR}/include/PCSC</span></div></div><div style="text-align: left;">por</div><div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">INCLDEFS += -I${PCSCINCDIR} -I${PCSCDIR}/include -I${PCSCDIR}/include/PCSC</span></div></div><div style="text-align: left;">Cambiar</div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">LDFLAGS += -L{PCSDIR}/lib -lpcslite -lpthread</span></div><div style="text-align: left;">por</div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">LDFLAGS += -framework PCSC -lpthread -arch i386 -arch x86_64</span></div><br />
<div style="text-align: left;">Cambiar</div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">DSTLIB = libjpcsc.so</span></div><div style="text-align: left;">por</div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">DSTLIB = libjpcsc.jnilib</span></div><div style="text-align: left;">Cambiar</div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">CCFLAGS += -Wall</span></div><div style="text-align: left;">por</div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">CCFLAGS += -Wall -arch i386 -arch x86_64</span></div><div style="text-align: left;">Y cambiar</div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">LINK = </span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">${CC} -shared -o ${ARCHDIR}/${DSTLIB} ${COBJS} ${LDFLAGS}</span></div><div style="text-align: left;">por</div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">LINK = </span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">${CC} -dynamiclib -o ${ARCHDIR}/${DSTLIB} ${COBJS} ${LDFLAGS}</span></div><div style="text-align: left;"><br />
</div><div style="text-align: left;"><b>Archivo </b><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><b>jpcsc.h </b></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><b><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">(dentro de s</span>rc/jpcsc<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">)</span></b></span></div><div style="text-align: left;">Cambiar</div><br />
<div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#else</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#include <winscard.h><winscard.h></winscard.h></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#endif</span></div><div style="text-align: left;">por</div><br />
<div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#else</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#define USE_SCARD_CONTROL_112</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#include <winscard.h><winscard.h></winscard.h></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#include "/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/types.h"</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">typedef unsigned long</span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">LONG;</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">typedef unsigned int</span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">DWORD;</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#endif</span></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Con todo esto, nos hemos asegurado de que el entorno de compilación sea capaz de encontrar todas las librerías que necesita, además de crear el tipo de librería adecuado (jnilib) con las arquitecturas que soporta el sistema operativo (Intel 32-bit y 64-bit).</div><div style="text-align: justify;">Una vez hechos los cambios, accederemos desde la terminal al directorio de jpcsc y compilamos</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$cd jpcsc</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$make</span></div><div style="text-align: justify;">Si hemos hecho todo correctamente, obtendremos una nueva versión del archivo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">libjpcsc.jnilib</span> dentro del directorio <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">build/darwin</span>.</div><br />
<br />
<div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: large;">Creación de la aplicación PAD Virtual</span></div><div style="text-align: justify;">Descargamos la aplicación java desde el área de descargas de la web sede del DNI electrónico:</div><div style="text-align: justify;"><a href="http://www.dnielectronico.es/descargas/PKCS11_para_Sistemas_Unix/PADVirtualv1_20.zip">http://www.dnielectronico.es/descargas/PKCS11_para_Sistemas_Unix/PADVirtualv1_20.zip</a></div><div style="text-align: justify;">Tras descomprimir el archivo obtenido, sustituimos en el directorio la librería PowerPC <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">libjpcsc.jnilib </span>por la que acabamos de crear para arquitectura Intel.</div><div style="text-align: justify;">Ahora, para acceder a la aplicación, bastaría con que abriéramos una ventana de terminal, desplazarnos al directorio de la misma y lanzar el script incluido:</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$cd PADVirtual v1.20</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$./Cambio_de_PIN.sh</span></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Sin embargo, las herramientas de desarrollo de Apple incluyen una utilidad que nos permite "empaquetar" las apliaciones de Java dentro de un ejecutable de Mac OS X, mucho más amigable para el usuario que el uso de scripts desde la terminal. Estos son los pasos para hacerlo en este caso.</div><div style="text-align: justify;">Abrir la aplicación Jar Bundler, que se encuentra dentro del directorio <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Applications/Utilities</span> en la instalación de XCode (normalmente en <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/Developer</span>).</div><div style="text-align: justify;">Añadimos el archivo JAR principal (en este caso <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">DNIeCambioDePIN.jar</span>), elegimos la versión de Java (en este caso 1.5) y, si queremos, añadimos también un icono.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ_CCDBX1lNERIDykcGy-auSpO8WaCaW0oN2iBfzXMQZLXo9AYiNlgVLugvY4Xo57x_4pPPlNF1k5Pmg3cI0qd2mHos0fwh4J7heOhlriAYRi4uHLrRI6TQ_ExVUToaTL-wVotwo_ZlBM/s1600/Captura+de+pantalla+2011-03-14+a+las+15.10.21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="595" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ_CCDBX1lNERIDykcGy-auSpO8WaCaW0oN2iBfzXMQZLXo9AYiNlgVLugvY4Xo57x_4pPPlNF1k5Pmg3cI0qd2mHos0fwh4J7heOhlriAYRi4uHLrRI6TQ_ExVUToaTL-wVotwo_ZlBM/s640/Captura+de+pantalla+2011-03-14+a+las+15.10.21.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: justify;">En la segunda opción añadimos el resto de archivos necesarios. En este caso se trata de: c<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">onfiguracion.properties</span>, <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">kv.cacert</span>, <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">libjpcsc.jnilib</span> y <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">log4j-1.2.16.jar</span> (este último es opcional y puede descargarse desde <a href="http://logging.apache.org/log4j/1.2/download.html">aquí</a>).</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVtCzmZRcVGPwepu1KYhDRCjJkVJmYOECos5lC3dfWY5XLPE8wTgTESbnzhecfp4Ks1F1soUkLGWwZKU9rPt3KVSyowcPe13jGXfyz8ZlFAxgzTEOp0LF8IVJvnWj_8C7QSY1QRlavuPQ/s1600/Captura+de+pantalla+2011-03-14+a+las+15.10.30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="596" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVtCzmZRcVGPwepu1KYhDRCjJkVJmYOECos5lC3dfWY5XLPE8wTgTESbnzhecfp4Ks1F1soUkLGWwZKU9rPt3KVSyowcPe13jGXfyz8ZlFAxgzTEOp0LF8IVJvnWj_8C7QSY1QRlavuPQ/s640/Captura+de+pantalla+2011-03-14+a+las+15.10.30.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: justify;">Finalmente, marcamos la opción "Set working directory to inside Application Package".</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicZ8TkhhE79JKXzqnyejdJFpn_1d-oH7ql1LRUigEklB73RrDcANNOCVsmSntcROjxOr1qUPPhltcb780W_5S34iwy1Y4DhtTpnE71r6NZkYpWFa76nFSLPgizJENJhmPOhLcVGyIDuXU/s1600/Captura+de+pantalla+2011-03-15+a+las+09.46.13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="596" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicZ8TkhhE79JKXzqnyejdJFpn_1d-oH7ql1LRUigEklB73RrDcANNOCVsmSntcROjxOr1qUPPhltcb780W_5S34iwy1Y4DhtTpnE71r6NZkYpWFa76nFSLPgizJENJhmPOhLcVGyIDuXU/s640/Captura+de+pantalla+2011-03-15+a+las+09.46.13.png" width="640" /></a></div><div style="text-align: justify;"> Ahora, al pulsar en el botón "Create Application…", elegiremos un nombre y un destino para nuestra nueva aplicación, que podremos utilizar como cualquier otra que tengamos en el ordenador.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: large;">Notas</span></div><div style="text-align: justify;">Como la aplicación utiliza su directorio de trabajo dentro del paquete, hay que asegurarse de que todos los usuarios tienen permiso de lectura y escritura sobre la aplicación (por ejemplo usando la opción "Obtener Información" en el menú archivo del Finder).</div><div style="text-align: justify;"><br />
</div><div><div style="text-align: justify;">Si se ha instalado en el equipo el software OpenSC + DNIe o bien OpenDNIe, es posible que, tras elegir el lector de tarjetas en la aplicación y pulsar en el botón "Siguiente", aparezca un mensaje diciendo que la tarjeta está ocupada.</div><div style="text-align: justify;">Esto suele suceder porque el sistema operativo está intentando acceder al contenido de la tarjeta usando el módulo tokend de OpenSC. Para liberar el acceso a la tarjeta para la aplicación de cambio de PIN, se debe eliminar el directorio: <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/System/Library/Security/tokend/OpenSC.tokend</span></div><div style="text-align: justify;">Una vez hecho este cambio, basta con extraer la tarjeta del DNIe y volver a insertarla en el lector antes de volver a intentar cambiar el PIN.</div><div style="text-align: justify;">En el momento de redactarse esta entrada, el modulo tokend de la versión más reciente de OpenSC (0.12.1 svn-trunk-253) no funciona correctamente con el DNI electrónico y puede ser eliminado si no se utiliza ninguna otra tarjeta de acceso compatible con OpenSC aparte del DNI electrónico. Si no fuera este el caso, bastaría con mover temporalmente a otra ubicación el directorio <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Opensc.tokend</span> o renombrado con otra extensión (por ejemplo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Opensc.tokend.disabled</span>), mientras se realice el cambio de PIN, y luego volver a dejarlo como estaba.<br />
<br />
<b>Actualización (Junio 2011)</b>: Las últimas versiones de OpenSC (se ha probado con la 0.12.2 svn-trunk-400) <u>tienen un módulo tokend que sí que funciona correctamente</u> con el DNI electrónico, incluyendo la integración con los llaveros del sistema, por lo tanto no conviene eliminar definitivamente el directorio <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Opensc.tokend </span>y debería ser renombrado con otra extensión (por ejemplo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Opensc.tokend.disabled</span>), mientras se realice el cambio de PIN, y luego volver a dejarlo como estaba.</div></div>Unknownnoreply@blogger.com7tag:blogger.com,1999:blog-4093323652903426539.post-2680475026037966432011-02-12T13:24:00.010+01:002013-06-21T10:09:32.890+02:00Compilación de OpenDNIe para Mac OS X<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Tras enterarme de la </span><a href="http://www.kriptopolis.org/opendnie-listo"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">presentación en sociedad de OpenDNIe</span></a><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">, driver de código abierto para el manejo del DNI electrónico, y comprobar que se basa en incluir soporte para el DNIe en </span><a href="http://www.opensc-project.org/opensc/"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">OpenSC</span></a><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">, proyecto que funciona también en Mac OS X, decidí intentar compilarlo para mi equipo.</span></div>
<div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Lo que se describen a continuación son los pasos para compilar e instalar OpenSC 0.12.1 con OpenDNIe, usando el código fuente disponible </span><a href="https://svn.forge.morfeo-project.org/opendnie/opensc-opendnie/trunk"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">aquí</span></a><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">. Durante el proceso, gracias a lo bien que están las cosas en OpenSC, también se genera un paquete de instalación para Mac OS X y una imagen de disco con el mismo, que he dejado disponible </span><a href="http://www.kounch.com/download/opendnie/"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">aquí</span></a><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"> para quien no tenga los medios, los conocimientos o las ganas de hacer esto, y mientras no haya una versión oficial en OpenSC.</span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"></span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><b>NOTA</b>: La parte de esta entrada relativa a la compilación ha quedado obsoleta en OS X Mountain Lion. Hay una nueva entrada <a href="http://kounch-mac.blogspot.com.es/2013/06/compilacion-de-opendnie-en-os-x.html">aquí</a> con todos los detalles.</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"></span><br />
<a name='more'></a></div>
</div>
<div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"></span></div>
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"></span><br />
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-size: large;">Requerimientos previos</span></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Aunque el código fuente de OpenSC está bastante bien preparado para compilarse, existen algunas herramientas que deben instalarse (además del entorno de desarrollo de Apple), ya que la versión que ofrece Apple por defecto de GNU <a href="http://www.gnu.org/software/autoconf/">autoconf</a> <a href="http://www.gnu.org/software/automake/">automake</a> y <a href="http://www.gnu.org/software/libtool/">libtool</a>, no son las más recientes y no funcionan correctamente).</span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Además, para poder hacer la creación completa del paquete de instalación de OpenSC, hace falta tener instalado <a href="http://git-scm.com/">Git</a>.</span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">En resumen, el primer paso consiste en preparar el entorno de desarrollo de Apple, que viene incluido con los discos de instalación del sistema operativo, o se puede descargar desde http://developer.apple.com/tools/xcode/.</span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">A continuación se debe instalar una versión más actualizada de las herramientas indicadas. Para mí lo más cómodo es hacerlo usando <a href="http://www.macports.org/">MacPorts</a>:</span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ sudo port install autoconf</span></span></div>
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ sudo port install automake</span></span></div>
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ sudo port install libtool +universal</span></span></div>
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ sudo port install git-core +universal</span></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-size: x-small;">Nota: En las últimas versiones de Mac OS X (creo que a partir de la 10.6.5),git-core requiere haber instalado previamente "Java for Mac OS X 10.6 Update 3 Developer Package", </span><a href="https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719"><span class="Apple-style-span" style="font-size: x-small;">disponible de forma gratuita</span></a><span class="Apple-style-span" style="font-size: x-small;"> en la web para desarrolladores de Apple).</span></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-size: x-small;">Nota2: Tal y como indican en los comentarios, la instalación de <i>git-core</i> es necesaria en el caso de usar XCode 3.x. En el caso de XCode 4.x, en su lugar hacen falta <i>pkgconfig</i> y <i>curl</i>.</span></span></div>
<div>
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">También es posible hacer esta instalación usando <a href="http://porticus.alittledrop.com/">Porticus</a>, una interfaz gráfica para MacPorts.</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-size: large;">Compilación e instalación</span></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Teniendo estos requisitos instalados, la compilación e instalación del software de OpenSC-OpenDNIe es bastante sencilla. Creamos un directorio de trabajo (¡ojo! la ruta completa a este directorio no debe incluir espacios o caracteres extraños), descargamos en el mismo la última versión del software y utilizamos los scripts de compilación e instalación incluídos:</span></div>
<div style="text-align: justify;">
</div>
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ mkdir workspace</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ cd workspace</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ svn checkout https://svn.forge.morfeo-project.org/opendnie/opensc-opendnie/trunk</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><b>NOTA IMPORTANTE para OS X 10.7.x</b>: Según la versión de OpenDNIe y la de OS X Lion, puede que los scripts de comprobación del paquete de instalación no detecten correctamente el sistema operativo (por ej. la versión 0.12.3 svn 412 no detecta la versión 10.7.1 de OS X, pero sí la 10.7.0).</span></div>
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Para corregirlo (en el caso de OS X 10.7.1), se debe editar el archivo en </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">./MacOSX/build/10.6/scripts/InstallationCheck</span><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">, cambiando las líneas de la forma</span><br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"># 10.6 system must be active</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if(CheckVersion("$SYSTEM_VERS", "10.7.0", "ProductVersion", ">")) {</span><br />
<br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">por</span><br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"># 10.6 system must be active</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if(CheckVersion("$SYSTEM_VERS", "10.7.1", "ProductVersion", ">")) {</span><br />
<br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Una vez corregido el script de instalación (si fuera necesario), compilamos.</span></div>
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ cd trunk</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ sudo ./MacOSX/build</span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Una vez haya terminado, tendremos instalado el software en nuestro equipo, y además habrá creado en el mismo directorio tanto el paquete de instalación como una imagen de disco con el mismo. También se instala un script de desinstalación por si quisiéramos eliminar OpenSC del equipo y que se puede invocar desde la Terminal (<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">sudo opensc-uninstall</span>)</span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Es aconsejable reniciar el equipo tras la instalación. A partir de este momento, ya será posible utilizar un lector de DNIe en nuestro Mac. Para comprobar que está funcionando, tras conectar el lector al ordenador e insertar un DNIe, usar el siguiente comando:</span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/Library/OpenSC/bin/opensc-tool -D</span></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Y comprobar que los mensajes son correctos (<a href="http://www.kriptopolis.org/dni-electronico-en-macosx">aquí</a> hay más información).</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-size: large;">Integración en Firefox</span></span></div>
<div style="text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">A continuación podemos añadir el módulo de OpenSC a Firefox para poder usar el lector de DNIe para acceder a distintos sitios web. Para ello, acceder a las preferencias avanzadas del navegador:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL5XLO5Ja2SXFRtAvzCZ6vfYfiYqrJMPdCJfFvlalB-nljPBI8N9Rxq2_z-0ptHmJFucM_Y3sJFv2McvIqqLrNhVplIaxnozO6NSw6PdMaAEgAoqumkvudNBJfglw-Ak5rWNDkE0Bq0kU/s1600/Captura+de+pantalla+2011-02-11+a+las+23.51.51.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="538" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL5XLO5Ja2SXFRtAvzCZ6vfYfiYqrJMPdCJfFvlalB-nljPBI8N9Rxq2_z-0ptHmJFucM_Y3sJFv2McvIqqLrNhVplIaxnozO6NSw6PdMaAEgAoqumkvudNBJfglw-Ak5rWNDkE0Bq0kU/s640/Captura+de+pantalla+2011-02-11+a+las+23.51.51.png" width="640" /></a></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Pulsar en el botón "Dispositivos de seguridad" y aparecerá una nueva ventana:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL5XLO5Ja2SXFRtAvzCZ6vfYfiYqrJMPdCJfFvlalB-nljPBI8N9Rxq2_z-0ptHmJFucM_Y3sJFv2McvIqqLrNhVplIaxnozO6NSw6PdMaAEgAoqumkvudNBJfglw-Ak5rWNDkE0Bq0kU/s1600/Captura+de+pantalla+2011-02-11+a+las+23.51.51.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp7HBsJeEugiVW59O43xVy_gLaT6gKW-snnf6stlO13J61alxtLXKwBeG25mwJs1Xw9jIun2mliPmbsjB1rUSqH9ugwgqCQCz-wipNF1CB9vGC08TwAtgSgUEY_03pIwzHkH-gnEjCDi0/s1600/Captura+de+pantalla+2011-02-11+a+las+23.51.59.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="443" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp7HBsJeEugiVW59O43xVy_gLaT6gKW-snnf6stlO13J61alxtLXKwBeG25mwJs1Xw9jIun2mliPmbsjB1rUSqH9ugwgqCQCz-wipNF1CB9vGC08TwAtgSgUEY_03pIwzHkH-gnEjCDi0/s640/Captura+de+pantalla+2011-02-11+a+las+23.51.59.png" width="640" /></a></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">En esta, pulsar en el botón "Cargar".</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6k8UXrnT029zqWHj-Y_G28WnIvR5r1zOk-VCNR6D7iq1lLSVsZktg2Y751vAXmmPtNMTAbNipQs0fNB_zBSJTXLG4a4a-2aIobwuwvsQVnC4Ngvw3diPLcxw0hEaUp8i5fU7uyxOvw-Y/s1600/Captura+de+pantalla+2011-02-11+a+las+23.52.33.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6k8UXrnT029zqWHj-Y_G28WnIvR5r1zOk-VCNR6D7iq1lLSVsZktg2Y751vAXmmPtNMTAbNipQs0fNB_zBSJTXLG4a4a-2aIobwuwvsQVnC4Ngvw3diPLcxw0hEaUp8i5fU7uyxOvw-Y/s1600/Captura+de+pantalla+2011-02-11+a+las+23.52.33.png" /></a></span></div>
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Introducir si queremos un nuevo nombre para el módulo (yo he puesto DNIe), e indicar la siguiente ruta:<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/Library/OpenSC/lib/opensc-pkcs11.so</span><br />
También, si no lo hubiéramos hecho ya, será necesario añadir a Firefox los certificados raíz de la Fábrica de Moneda y Timbre y del DNI electrónico. Esto es algo que está bien explicado en muchos sitios, por ejemplo, <a href="http://wiki.bandaancha.st/Certificado_ra%C3%ADz_de_la_FNMT_en_Firefox">aquí</a> y <a href="http://wiki.bandaancha.st/Certificado_ra%C3%ADz_del_DNIe:_DNI_electr%C3%B3nico_en_Firefox">aquí</a>.<br />
Ahora, a modo de prueba, se puede acceder a la página web de comprobación:<br />
<a href="http://www.dnielectronico.es/como_utilizar_el_dnie/verificar.htm">http://www.dnielectronico.es/como_utilizar_el_dnie/verificar.htm</a>l<br />
<br />
<br />
Como nota final una advertencia: aunque el software que hemos instalado funcione correctamente, los sitios a los que accedadmos desde el Mac no tienen por qué hacerlo. Existen sitios de bancos, cajas de ahorros, etc. que dicen estar preprados para acceder con DNI electrónico, etc. y puede que incluso mencionen al Mac pero luego en realidad sólo están diseñados y probados en Windows y no funcionan con otros (Mac, Linux). Esto no suele ser así con las administraciones públicas, donde en general sí que parece ir todo bien.<br />
</span></div>
Unknownnoreply@blogger.com14tag:blogger.com,1999:blog-4093323652903426539.post-40286410606561154502011-01-21T13:35:00.000+01:002011-01-21T13:35:15.872+01:00Recuperando cómics desde un iPhone/iPad/iPod Touch<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Desde mediados de 2009 existen varias aplicaciones para dispositivos iOS que permiten obtener, de forma legal, cómics gratuitos o de pago para poder leerlos en dichos aparatos. Hoy vamos a hablar de una manera de extraer los datos de dichos cómics a nuestro Mac, para así poder verlos, por ejemplo, con una aplicación como Simple Comic para Mac (<a href="http://dancingtortoise.com/simplecomic/">http://dancingtortoise.com/simplecomic/</a>).</span></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"></span></div><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><a name='more'></a></span></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">En primer lugar tenemos que conectar nuestro iAparato al Mac usando USB, y examinaremos la información que contiene usando iPhone Explorer (<a href="http://www.macroplant.com/iphoneexplorer/">http://www.macroplant.com/iphoneexplorer/</a>). Tras localizar la aplicación de cómics de la que queremos guardar copia, identificamos la carpeta donde se encuentran los archivos descargados. Normalmente es una llamada "Books" o "CXBooks" dentro de "Library/Caches/Comics". Para copiar el directorio bastará con arrastrarlo hacia el escritorio del Mac.</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiraE_7lRHoPyrboe3OdX_4W5Cei8U5wUQ8d38x6SloLufd-t95E4RTPbaCZONVmaDpH4qrtJtzcdGTbGnSS3fHg4cpDDzvC4vnc56G4DKMl-MaU3UTfFUFqj4C9GQbDosaeBVHWai1qFo/s1600/copiacomic-01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiraE_7lRHoPyrboe3OdX_4W5Cei8U5wUQ8d38x6SloLufd-t95E4RTPbaCZONVmaDpH4qrtJtzcdGTbGnSS3fHg4cpDDzvC4vnc56G4DKMl-MaU3UTfFUFqj4C9GQbDosaeBVHWai1qFo/s640/copiacomic-01.png" width="640" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span></div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><span class="Apple-style-span" style="font-size: x-small;">Notar que este paso también es fácil de realizar en un equipo con Windows, usando la versión correspondiente de iPhone Explorer.</span></span></div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span></div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">En general, nos encontraremos una carpeta dentro de Books o CXBooks por cada cómic que hayamos descargado, y en su interior habrá varios ficheros con nombres numéricos o extraños, pero habitualmente ordenados por número de página. Si analizamos estos ficheros, veremos que realmente son imágenes JPG estándar, así que lo que vamos a hacer ahora es renombrarlos adecuadamente.</span></div></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWefTQDKGmOoMoMckBEIJrbWN1zrVHSY6DwjYqqQRIJEDuG2iNIEdIFAgcwLLuOZX9d7OjsjJZ2jekEA5PrDaOe8a__0W5v8B-4MhyphenhyphenPJim7KFSn4puAum0jP2rYKrsxTPEVyVd1I3wO4g/s1600/copiacomic-03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="436" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWefTQDKGmOoMoMckBEIJrbWN1zrVHSY6DwjYqqQRIJEDuG2iNIEdIFAgcwLLuOZX9d7OjsjJZ2jekEA5PrDaOe8a__0W5v8B-4MhyphenhyphenPJim7KFSn4puAum0jP2rYKrsxTPEVyVd1I3wO4g/s640/copiacomic-03.png" width="640" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span></div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">En algunos casos puede que nos encontremos más ficheros que páginas reales del cómic, por ejemplo porque se incluyan dos versiones de cada página, una en pequeño, y otra en grande. En ese caso, es fácil descartar las imágenes pequeñas simplemente filtrando por tamaño.</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDFPWLV9acWkiiKsii_j2vCocLQ4Mrisc0UIbLuB7HR6ai6EiSYmckWPnUAYcFT9eI_m0GodDTHbR8mHgpvpHCw4c4NyS2FCnKnfm6-HRUOp_Ykn5UQ4pA4cCkf6Fp3tzc_BOL8lQ5CCQ/s1600/copiacomic-02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDFPWLV9acWkiiKsii_j2vCocLQ4Mrisc0UIbLuB7HR6ai6EiSYmckWPnUAYcFT9eI_m0GodDTHbR8mHgpvpHCw4c4NyS2FCnKnfm6-HRUOp_Ykn5UQ4pA4cCkf6Fp3tzc_BOL8lQ5CCQ/s640/copiacomic-02.png" width="640" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span></div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Una vez tengamos identificados los ficheros de imágenes de cada página, abriremos Automator y preparaemos un nuevo flujo de trabajo con las siguientes características:</span></div></div><div><ol><li style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Seleccionar los ficheros que hemos identificado</span></li>
<li style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Renombrar los ficheros de forma secuencial</span></li>
<li style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Añadir la extensión .jpg al final</span></li>
</ol><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr5j7r4g8qzjyp_hqhxf121RzAOYAG1WWNNm1-FJrMx4U_qqR69ybRaR4Tdtw7JBMssA50I_SXQgmO_praG8ZX-4MX34csKcCsCQt1jB6N_-rS1hEdkFhNci0DDCTK9_33yAKAzqkiuOM/s1600/copiacomic-04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr5j7r4g8qzjyp_hqhxf121RzAOYAG1WWNNm1-FJrMx4U_qqR69ybRaR4Tdtw7JBMssA50I_SXQgmO_praG8ZX-4MX34csKcCsCQt1jB6N_-rS1hEdkFhNci0DDCTK9_33yAKAzqkiuOM/s640/copiacomic-04.png" width="640" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span></div></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3IghMuIMcvCBlSwcLr2dPQlJCQtvDuAg3-4vTgwbhYcpOC3Rk_wrpQxvLwNkN8GSA9g5Sv3vl1A5dON1ZH8ipk1DrszdAf_obmTlrJYupqnnPWmJSqyN65z3jWjnekgkkaBxiqGHkB-s/s1600/copiacomic-05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="94" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3IghMuIMcvCBlSwcLr2dPQlJCQtvDuAg3-4vTgwbhYcpOC3Rk_wrpQxvLwNkN8GSA9g5Sv3vl1A5dON1ZH8ipk1DrszdAf_obmTlrJYupqnnPWmJSqyN65z3jWjnekgkkaBxiqGHkB-s/s640/copiacomic-05.png" width="640" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Tras ejecutar el flujo y comprobar que las imágenes son las correctas y están en el orden adecuado, comprimos en un archivo ZIP las mismas.</span></div></div><div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfA9GsXPW8IzBsie5HRhFQH8du3yZfBW4FhcA-yOadq7k2SKtXVzEwjToxTks_krv1ihzmP8c__PKdWs9we7Hg80II3wMnr0v84IHXGsSu9D9LnTtRnH0RNzyRDZnRQQKEtPCAyyP6bGU/s1600/copiacomic-06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfA9GsXPW8IzBsie5HRhFQH8du3yZfBW4FhcA-yOadq7k2SKtXVzEwjToxTks_krv1ihzmP8c__PKdWs9we7Hg80II3wMnr0v84IHXGsSu9D9LnTtRnH0RNzyRDZnRQQKEtPCAyyP6bGU/s1600/copiacomic-06.png" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir-SYnc2A83mGPdtLsN9_FX0dZFQ0jwCp5xw7GiDQMDdj1DmU-P2bkRKoF5_zWdB5OFEbqaQJaRiCDebFpBRQPEDR0t7Is1bP7W9OJR0I4y6uWlqMcUyMFF3KGQdiYxwvtiQv5eKR72Wk/s1600/copiacomic-07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir-SYnc2A83mGPdtLsN9_FX0dZFQ0jwCp5xw7GiDQMDdj1DmU-P2bkRKoF5_zWdB5OFEbqaQJaRiCDebFpBRQPEDR0t7Is1bP7W9OJR0I4y6uWlqMcUyMFF3KGQdiYxwvtiQv5eKR72Wk/s1600/copiacomic-07.png" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span></div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Finalmente, renombramos el archivo de ZIP a CBZ (Comic Book ZIP), y así lo tendremos preparado para poder leerlo con nuestro lector de cómics favorito.</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoEZSXmFR3TMzoUwHgSSBdWoT8_mX439mnQJdVnY1ZIY9T34LRNdmVkOmr7S5bdnv7DSk6_8QbQO1byLtzCRN7qookIq6gymWBp_B2pNxBnCjG3XNczfVMppIBFKQrnpmBLJGEauGdKiI/s1600/copiacomic-08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoEZSXmFR3TMzoUwHgSSBdWoT8_mX439mnQJdVnY1ZIY9T34LRNdmVkOmr7S5bdnv7DSk6_8QbQO1byLtzCRN7qookIq6gymWBp_B2pNxBnCjG3XNczfVMppIBFKQrnpmBLJGEauGdKiI/s1600/copiacomic-08.png" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS0QhYPS90WkoUSPktCoP_Lh3GQtU22xdBl4ewOSghOtQHkrEtSbH54WuUdyGiGN-YdBC_fodKjx9KhqSBbEo8qEopwSzk6VlbPuoJX_wvtrfdIL6TEsHBtcf3aVPNxICWPB_Z-LyeJBE/s1600/copiacomic-09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS0QhYPS90WkoUSPktCoP_Lh3GQtU22xdBl4ewOSghOtQHkrEtSbH54WuUdyGiGN-YdBC_fodKjx9KhqSBbEo8qEopwSzk6VlbPuoJX_wvtrfdIL6TEsHBtcf3aVPNxICWPB_Z-LyeJBE/s1600/copiacomic-09.png" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br />
</span></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-23328381955242657182010-08-01T20:54:00.000+02:002010-08-01T20:54:38.761+02:00Túnel IPv6 automático en Mac OS X<div style="text-align: justify;">Aunque hay dispositivos de red (como las estaciones base Airport de Apple o los routers Linksys WRT610N) que permiten encapsular IPv6 dentro de IPv4, lo normal es que nuestra conexión hacia internet sea IPv4.</div><div style="text-align: justify;">En esta entrada vamos a explicar una forma de obtener una dirección IPv6 para un Mac, y cómo instalar software de manera que se conecte automáticamente, a través de un tunel, para poder acceder a internet.</div><div style="text-align: justify;">Para ello utilizaremos una cuenta de <a href="http://www.sixxs.net/">SixXS</a> y el software <a href="http://www.sixxs.net/tools/aiccu/">AICCU</a> para Mac OS X.</div><br />
<div style="text-align: justify;"><a name='more'></a></div><br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Instrucciones:</span></div><div style="text-align: justify;"></div><ul><li>En primer lugar, si no la teníamos, habrá que crearse una cuenta en SixXS y solicitar un túnel, tal y como se describe en los puntos 1 a 6 de las instrucciones siguientes: <a href="http://www.sixxs.net/faq/account/?faq=10steps">http://www.sixxs.net/faq/account/?faq=10steps</a>.</li>
<li>Descargamos e instalamos <a href="http://tuntaposx.sourceforge.net/">TunTap para Mac OS X</a>.</li>
<li>Descargamos AICCU, bien <a href="https://www.sixxs.net/archive/sixxs/aiccu/unix/aiccu_current.tar.gz">en código fuente</a> (y lo compilamos nosotros), o bien <a href="https://www.sixxs.net/archive/sixxs/aiccu/mac/aiccu-mac-i386.exe">ya compilado</a> y lo instalamos (normalmente en <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/usr/local/sbin/aiccu</span></li>
<li>Una vez dispongamos de los datos del tunel, creamos un archivo de configuración <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/etc/aiccu.conf</span>, teniendo especial cuidado de rellenar correctamente, al menos, los siguientes valores:</li>
</ul><br />
<br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">username <usuario de acceso al túnel (proporcionado por sixxs)></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">password <clave de acceso al túnel></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">ipv6_interface tun0</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">daemonize true</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">automatic true</span></div><br />
<div style="text-align: justify;">En este momento, bastaría con lanzar con un usuario administrador el comando <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/usr/local/sbin/aiccu start</span> para realizar la conexión al túnel.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Los siguientes pasos servirán para configurar un demonio de Launchd que inicie la conexión cada vez que se inicie el ordenador.</div><div style="text-align: justify;"></div><ul><li>En primer lugar creamos un script de bash, por ejemplo en /usr/local/sbin/aiccu.sh con el siguiente contenido:</li>
</ul><br />
<br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">#!/bin/sh</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">MYTUN="/dev/tun0"</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">FORWARD=1</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">while [ ! `ping -c 1 -t 2 www.sixxs.net` ] ; do</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> echo "Internet no disponible (www.sixxs.net), esperando un poco antes de reintentar."</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> sleep 30</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">done</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">echo "Internet disponible!"</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">while [ ! -e $MYTUN ] ; do</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> echo "/dev/tun0 no encontrado, esperando un poco antes de reintentar."</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> sleep 5</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">done</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">echo "/dev/tun0 encontrado, iniciando aiccu..."</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">while [ ! `ping6 -c 1 -i 2 ipv6.google.com` ] ; do</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> echo "Tunel IPv6 Tunnel no disponible (sin ruta a ipv6.google.com)"</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> /usr/local/sbin/aiccu start</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> sleep 5</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">done</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">echo "Finalizado."</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">exit 0</span></div><div style="text-align: justify;">Este script es necesario, como se puede observar en los comentarios, porque aiccu no se inicia correctamente si no se cumplen que TunTap esté instalado y funcionando y la conexión a internet esté activa. Además, en algunos casos, sucede que aún así es necesario lanzarlo un par de veces antes de que funcione, de manera que el script lo reintententa hasta que pueda comprobar que llega a la página web IPv6 de Google.</div><br />
<div style="text-align: justify;"></div><ul><li>Finalmente, añadiremos un archivo de configuración de launchd en /Library/LaunchDaemons/net.sixxs.aiccu con el siguiente contenido:</li>
</ul><br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><?xml version="1.0" encoding="UTF-8"?></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> "http://www.apple.com/DTDs/PropertyList-1.0.dtd"></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><plist version="1.0"></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><dict></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> <key>Label</key></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> <string>net.sixxs.aicu</string></span></div><div style="text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><key>Disabled</key></span></div><div style="text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><false/></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> <key>ProgramArguments</key></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> <array></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> <string>/usr/local/sbin/aiccu.sh</string></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </array></span></div><div style="text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><key>RunAtLoad</key></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><true/></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></dict></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></plist></span></div><div style="text-align: justify;">De esta manera, el sistema intentará lanzar el script en <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/usr/local/sbin/aiccu.sh</span> cada vez que se inicie.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">¡Y ya está! De forma transparente, si lo necesitan, las aplicaciones y servicios que tengamos que acceden a internet tendrán disponible acceso a IPv6.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-53845104002141421322010-07-20T17:10:00.009+02:002011-04-09T09:34:43.279+02:00Cómo ver libros de "Libranda" en un iPhone/iPod/iPad, el camino díficil<div>Esta es la segunda parte de dos entradas dedicadas a explicar métodos para poder leer libros protegidos con el sistema ADEPT en dispositivos que, de serie, no lo soportan.</div><div><br />
</div><div>Esta segunda parte explica una forma de hacerlo válida para cualquier dispositivo lector de libros electrónicos. Aunque la explicación está realizada con un Mac, es perfectamente adaptable para hacerse desde otro sistema (Windows, Linux, etc.).</div><div><br />
<a name='more'></a><br />
</div><div><span class="Apple-style-span" style="font-size: x-large;">Herramientas necesarias:</span></div><div>Adobe Digital Editions (y algún libro descargado, claro)<br />
Pycrypto instalado en el Mac (por ejemplo, usando usando MacPorts: http://www.macports.org/ o como indican aquí, en inglés: http://dearauthor.com/wordpress/2010/02/21/how-to-install-python-and-pycrypto/)<br />
Los scripts de Python ineptkey e ineptepub (http://i-u2665-cabbages.blogspot.com/2009/02/circumventing-adobe-adept-drm-for-epub.html)</div><div><br />
</div><div><span class="Apple-style-span" style="font-size: x-large;">Instrucciones:</span></div><div>Como ya mencionábamos en la <a href="http://kounch-mac.blogspot.com/2010/07/como-ver-libros-de-en-un-iphoneipodipad.html">entrada anterior</a>, los libros con protección ADEPT no se pueden visualizar con casi ninguna app de iPhone/iPad/iPod. Por ejemplo, esto es lo que sucede si, tras seguir <a href="http://www.error500.net/articulo/comprar-un-libro-electronico-en-espana-con-libranda-odisea-en-ciberespacio">el engorroso proceso de comprar un libro de Libranda</a>, sincronizamos dicho libro con iTunes e intentamos abrirlo en la aplicación iBooks de un iPhone:</div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQC0KAEMfGHQzLiQkO3ZUmVNjoSIzTYQKoAwOj3u1xIJlVAAKIQeZqJdghIfocPtz8_EU1mAzzZL6DQkngjYxsONWbHWnvN7Lb7YofWVOgMoH4xV-YatVMNmwLPWYzUTDnBwrCNtiZP9E/s1600/IMG_0002.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQC0KAEMfGHQzLiQkO3ZUmVNjoSIzTYQKoAwOj3u1xIJlVAAKIQeZqJdghIfocPtz8_EU1mAzzZL6DQkngjYxsONWbHWnvN7Lb7YofWVOgMoH4xV-YatVMNmwLPWYzUTDnBwrCNtiZP9E/s320/IMG_0002.PNG" width="213" /></a></div></div><div>Lo que vamos a explicar a continuación puede ser ilegal en algunos países, ya que consiste en eliminar el cifrado del archivo ePub. Pero <b>¡ojo! este método NO elimina los identificadores digitales que asocian el libro con la cuenta de Adobe con que se descargó</b>. Por lo tanto no es nada aconsejable andar repartiéndolo alegremente por ahí, ya que podría acabar ocurriendo que bloquearan la cuenta de Adobe original.</div><div><br />
</div><div>El método es relativamente sencillo:</div><div><br />
<ul><li>Con Adobe Digital Editions descargado en el Mac, y habiéndolo usado para autorizar al menos un libro, lanzar el script "ineptkey" (<b>Nota importante:</b> El archivo debe tener una extension pyw en el nombre (por ej: <i>ineptkey.pyw</i>) para funcionar correctamente, así que hay que cambiar el nombre si fuera distinto), y debe estar asociado para que Mac OS X lo abra con <i>Python Launcher</i>.</li>
</ul></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGgWGi0Jrtl2ntBRJ54h1AzVe3PZVVbGDvVM48pTYGs6lu8L4nBkIv4vFSix-rsEUN3-VIne54TNcYG-22j-5CQsc0S6x4aiBFlOPYN0cKd0usGIrxyMgG2PiQsxG5Z1VeWfqw9YOeoDc/s1600/Captura+de+pantalla+2010-07-19+a+las+13.52.52.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGgWGi0Jrtl2ntBRJ54h1AzVe3PZVVbGDvVM48pTYGs6lu8L4nBkIv4vFSix-rsEUN3-VIne54TNcYG-22j-5CQsc0S6x4aiBFlOPYN0cKd0usGIrxyMgG2PiQsxG5Z1VeWfqw9YOeoDc/s400/Captura+de+pantalla+2010-07-19+a+las+13.52.52.png" width="400" /></a></div></div><div>Esto obtendrá la clave de acceso de Digital Editions, guardándola en un archivo que normalmente llama "adeptkey.cer". Este paso sólo será necesario hacerlo una vez.</div><div><br />
<ul><li>Abrir el script "ineptepub", e indicar la ruta al archivo ePub a desproteger, al archivo de clave de Digital Editions, e indicar dónde se quiere guardar, y con qué nombre, la copia sin protección.</li>
</ul></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQM2SEIJsD4yOHU772UYciETWVokdJISlXUdQYqNP5fkUDSirireqdZqbqgYwfAgik9BeKmECe-zcbFAKR8AGDJSjM1Po39hWYN4Z2u5RWTQ4S767g1cWOg6QVzcH5uvLvofwQxSevbX0/s1600/Captura+de+pantalla+2010-07-19+a+las+13.49.24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="137" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQM2SEIJsD4yOHU772UYciETWVokdJISlXUdQYqNP5fkUDSirireqdZqbqgYwfAgik9BeKmECe-zcbFAKR8AGDJSjM1Po39hWYN4Z2u5RWTQ4S767g1cWOg6QVzcH5uvLvofwQxSevbX0/s400/Captura+de+pantalla+2010-07-19+a+las+13.49.24.png" width="400" /></a></div></div><div><br />
<ul><li>Si no hay ningún problema, se creará dicha copia, que ahora sí se puede usar con cualquier aplicación que permita leer archivos ePub, incluso siendo posible convertirlo a otro formato.</li>
</ul></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYcvG3M7mO5M781OlHBiJl8Hr34jhKpSMcejtdJW-S8_hEXb7Yx9eSKTxjlZ_Gz_m6-YcBx20AQV-KcPjvDda2lzyd5StFC4vmm_weoax9rLi9dOo9owH2o7g_T2h0BWAHiSHUB_Y6NU4/s1600/IMG_0010.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYcvG3M7mO5M781OlHBiJl8Hr34jhKpSMcejtdJW-S8_hEXb7Yx9eSKTxjlZ_Gz_m6-YcBx20AQV-KcPjvDda2lzyd5StFC4vmm_weoax9rLi9dOo9owH2o7g_T2h0BWAHiSHUB_Y6NU4/s320/IMG_0010.PNG" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYcvG3M7mO5M781OlHBiJl8Hr34jhKpSMcejtdJW-S8_hEXb7Yx9eSKTxjlZ_Gz_m6-YcBx20AQV-KcPjvDda2lzyd5StFC4vmm_weoax9rLi9dOo9owH2o7g_T2h0BWAHiSHUB_Y6NU4/s1600/IMG_0010.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7tS1UmqczHDpajAMNQ1eGu7LQtYAeV_O3cSLBSXh4MDqvwylmE8AcFlQb3eUL0tPc950VG-s-jRVHtX6-YNdL0MDRzqua8exuTOhyphenhyphenQygAXc83fS8BB73udbnSpkc99vowHhhHKDNf1Lg/s1600/IMG_0013.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7tS1UmqczHDpajAMNQ1eGu7LQtYAeV_O3cSLBSXh4MDqvwylmE8AcFlQb3eUL0tPc950VG-s-jRVHtX6-YNdL0MDRzqua8exuTOhyphenhyphenQygAXc83fS8BB73udbnSpkc99vowHhhHKDNf1Lg/s320/IMG_0013.PNG" width="214" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia_59dujuVF7jzLBbpN3WJbtwHTLaW_ShgpnP2VTwLjdqcMHfz7UzwxdG4nl2Hk6-xJ9rycIVxTIuvyQhhB7R_Yac947h9QGOLJH5wi5tByHaSIS5JaYoLXcxvvqtPCcXRwWdn3t2zZSA/s1600/IMG_0014.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia_59dujuVF7jzLBbpN3WJbtwHTLaW_ShgpnP2VTwLjdqcMHfz7UzwxdG4nl2Hk6-xJ9rycIVxTIuvyQhhB7R_Yac947h9QGOLJH5wi5tByHaSIS5JaYoLXcxvvqtPCcXRwWdn3t2zZSA/s320/IMG_0014.PNG" width="214" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIqLhIcztZbIjVmhBeXmp0KM2Vo4e2L2g9Mju4wd4MyvUsaIFQ_W8OhCDM2N5ghUSgKH_C-4YlDdX-nRC6SG9K8Fs5kGsguu0ObtDAC1wUPjNE-SAar45FNa1DrmVj3Dpewcrb1WvAf0o/s1600/Captura+de+pantalla+2010-07-19+a+las+14.05.22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="285" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIqLhIcztZbIjVmhBeXmp0KM2Vo4e2L2g9Mju4wd4MyvUsaIFQ_W8OhCDM2N5ghUSgKH_C-4YlDdX-nRC6SG9K8Fs5kGsguu0ObtDAC1wUPjNE-SAar45FNa1DrmVj3Dpewcrb1WvAf0o/s320/Captura+de+pantalla+2010-07-19+a+las+14.05.22.png" width="320" /></a></div><br />
</div><div>Como ya comentaba en el mensaje anterior, un método mucho más complicado, no al alcance que cualquiera y que no tiene nada que ver con la compra, por ejemplo, desde Kindle o iBooks Store. Esperemos que las editoras de libros en español espabilen y se adapten, bien eliminando esta protección que sólo complica la vida a los compradores legítimos, bien incluyendo sus catálogos en otras plataformas, además de adaptar sus precios a algo más razonable.<br />
<br />
<br />
<b>Actualización</b>: En algunos casos, en Mac OS X 10.6 la librería pycrypto se instala en un directorio equivocado: <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/Library/Frameworks/Python.frameworks/versions/2.6/lib/python2.6/site-packages/</span><br />
Para que todo funcione, habrá que copiar el directorio <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">Crypto</span>, con todo su contenido y un archivo llamado <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">pycrypto-2.0.1-py2.5.egg-info</span>, dentro del directorio <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/Library/Python/2.5/site-packages/</span>. Si el fichero se llamara <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">pycrypto-2.0.1-py2.6.egg-info</span>, habrá que renombrarlo tras la copia, usando el nombre <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">pycrypto-2.0.1-py2.5.egg-info</span>.</div><div><br />
</div><div><br />
</div>Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-4093323652903426539.post-62455558569264745282010-07-19T16:38:00.002+02:002011-04-11T17:55:27.273+02:00Cómo ver libros de "Libranda" en un iPhone/iPod/iPad, el camino más díficil<div style="text-align: justify;">Esta es la primera parte de dos entradas dedicadas a explicar métodos para poder leer libros protegidos con el sistema <a href="http://www.adobe.com/devnet/digitalpublishing/pdfs/ADEPT_datasheet.pdf">Adobe Digital Experience Protection Technology(ADEPT)</a> en dispositivos que, de serie, no lo soportan. La protección ADEPT (no lo llamaremos DRM porque realmente no es un sistema de DRM completo) es la que se utiliza, por ejemplo, en los libros disponibles desde hace unos días en las tiendas de la plataforma <a href="http://www.libranda.com/">Libranda</a>.</div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Por lo que he podido ver, sin contar con <a href="http://www.error500.net/articulo/comprar-un-libro-electronico-en-espana-con-libranda-odisea-en-ciberespacio">el engorro que es empezar a utilizar el sistema</a>, lograr hacerlo en un iPad/iPhone/iPod no es una tarea imposible, aunque sí puede ser difícil o muy difícil, sobre todo para una persona normal y que no esté acostumbrada a los ordenadores. Esto contrasta con la facilidad con que se pueden usar en otras tiendas (véase Kindle o iBooks, por ejemplo).</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Esta primera parte explica una forma de hacerlo que sólo es válida para iPhone/iPod/iPad. Aunque la explicación está realizada con un Mac, es perfectamente adaptable para hacerse desde otro sistema (Windows, Linux, etc.).</div></div><div><br />
<a name='more'></a></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Herramientas necesarias:</span></div></div><div><div style="text-align: justify;">Adobe Digital Editions (y algún libro descargado, claro)</div></div><div><div style="text-align: justify;"><a href="http://itunes.apple.com/es/app/txtr/id298464404?mt=8">La aplicación txtr</a> para iPhone</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Instrucciones:</span></div></div><div><div style="text-align: justify;">Tras estar buscando durante un tiempo, parece que la única aplicación de iOS que soporta de manera nativa los libros protegidos con ADEPT es txtr. Esta aplicación puede sincronizarse con contenido externo, como un libro que hayamos comprado.</div></div><div><div class="separator" style="clear: both; text-align: center;"><br />
</div><ul><li style="text-align: justify;">En primer lugar hay que crearse una cuenta gratuita en <a href="http://txtr.com/">http://txtr.com</a></li>
<li style="text-align: justify;">Una vez estemos registrados iremos a la zona de la web marcada como "ME", y subiremos el ePub protegido (usando el botón "Upload texts"). Yo prefiero hacerlo en la zona privada.</li>
<li style="text-align: justify;">Ahora iremos al iPhone y abriremos la app txtr, conectándonos a txtr.com con el mismo usuario y clave que hemos subido el libro.</li>
</ul><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlktOU7voCA74TA6W8GWRvMa1VI8YH2Y2t4XbmpExGQ7HMEkb0aUT_4Iuo1zgDRu5s6Xzij_wSzOO8dC0OFM3R7yI0u4Db4oYN1DReTnHuX5wmlEIclUGwwamZpn8BmY72FDwAzhQc31c/s1600/IMG_0003.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlktOU7voCA74TA6W8GWRvMa1VI8YH2Y2t4XbmpExGQ7HMEkb0aUT_4Iuo1zgDRu5s6Xzij_wSzOO8dC0OFM3R7yI0u4Db4oYN1DReTnHuX5wmlEIclUGwwamZpn8BmY72FDwAzhQc31c/s320/IMG_0003.PNG" /></a></div><ul><li style="text-align: justify;">Ahora, al elegir el libro, podremos descargarlo en el teléfono</li>
</ul><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5eFrQopN8T_NYTqM18M4OOzd7DXANsmV7LgZKqn7hGOaxS02-T76Ihl_EqJrUoH9Hfscxv9Np8jzIJfVHPqPl3VMOq5jwz8pKJoZc8yIvGlrQpFli0LQdrHIUAC7v-wYV0QaChEkorLo/s1600/IMG_0004.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5eFrQopN8T_NYTqM18M4OOzd7DXANsmV7LgZKqn7hGOaxS02-T76Ihl_EqJrUoH9Hfscxv9Np8jzIJfVHPqPl3VMOq5jwz8pKJoZc8yIvGlrQpFli0LQdrHIUAC7v-wYV0QaChEkorLo/s320/IMG_0004.PNG" /></a></div><ul><li style="text-align: justify;">Finalmente, tendremos que introducir los datos de la cuenta de Adobe que tiene permiso para leer el libro.</li>
</ul><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikQaSBeuGgW1clgdmhRMMJNVLNXWINLf1S2qn1gFjdXjidNXFQpTaXPpo_QkQTF1H9f0Hjur8q2TgprMn-l8srwC3cntszAT1mAauN_MK6LCmmJZkdoaHBN0EtrxmzxsX5FuXGMzoZYhY/s1600/photogs.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikQaSBeuGgW1clgdmhRMMJNVLNXWINLf1S2qn1gFjdXjidNXFQpTaXPpo_QkQTF1H9f0Hjur8q2TgprMn-l8srwC3cntszAT1mAauN_MK6LCmmJZkdoaHBN0EtrxmzxsX5FuXGMzoZYhY/s320/photogs.jpg" /></a></div><div style="text-align: center;"><br />
</div><div style="text-align: justify;">La gran desventaja de este sistema es el lector de libros que incorpora la app txtr, que está bastante limitado, con sólo tres tamaños de letra, acceso a la tabla de contenidos del libro y poco más.</div><div style="text-align: justify;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3r1wUdZOaMD-4J6LiOd2bv4yqyZUvk-VuOwbpkPT1XBa9lyZut2DeGzIu_KRyuPjlzFj1QLx-n58S2BJi0Fc6ICD-uAAGu3b-U_cG42FYcy7wIhtTwYj_z642qg9LiN4uhFOHtfC9iLo/s1600/IMG_0005.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3r1wUdZOaMD-4J6LiOd2bv4yqyZUvk-VuOwbpkPT1XBa9lyZut2DeGzIu_KRyuPjlzFj1QLx-n58S2BJi0Fc6ICD-uAAGu3b-U_cG42FYcy7wIhtTwYj_z642qg9LiN4uhFOHtfC9iLo/s320/IMG_0005.PNG" width="214" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv99NJhws326aHvsnqBI5W5xHCRKj3MhfGpcPY2ysKE2FxGBEZ0tQyPqMxy3Wn99sb8dQqNTdShtf68tlOP33avxX8x4qPcivR41k9XIq53AgIhMxo3VGb6_-UlZcd-b1uy393MN6Oy40/s1600/IMG_0007.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv99NJhws326aHvsnqBI5W5xHCRKj3MhfGpcPY2ysKE2FxGBEZ0tQyPqMxy3Wn99sb8dQqNTdShtf68tlOP33avxX8x4qPcivR41k9XIq53AgIhMxo3VGb6_-UlZcd-b1uy393MN6Oy40/s320/IMG_0007.PNG" width="214" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSAXKniz6__cUy7KDHdscDOewngT_42VJWCrinZNz8eCaDHAX5oTHJxf9IjrOZoDNAA4e5YEGiqAGCD70zW4eBWl6lVBlHrgOoNLNmPmPNdgQv6nq6fmpjCW4-OIjLeIDkOD3vnXumKe0/s1600/IMG_0008.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSAXKniz6__cUy7KDHdscDOewngT_42VJWCrinZNz8eCaDHAX5oTHJxf9IjrOZoDNAA4e5YEGiqAGCD70zW4eBWl6lVBlHrgOoNLNmPmPNdgQv6nq6fmpjCW4-OIjLeIDkOD3vnXumKe0/s320/IMG_0008.PNG" width="214" /><span class="Apple-style-span" style="-webkit-text-decorations-in-effect: none; color: black;"></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR-YM_2IC7PdaivFhBPKYrhipol4cQuWzH1IZUX8kbCocA5AjMiDD_FzDFIAbGAZZx0Onl-tegaXD-vmuCdExIR6CAIIHp2tPlRgjjVAbOTrWS-xq6SvsgpcJ4DFQ41GRaswawvybmuBg/s1600/IMG_0009.PNG" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR-YM_2IC7PdaivFhBPKYrhipol4cQuWzH1IZUX8kbCocA5AjMiDD_FzDFIAbGAZZx0Onl-tegaXD-vmuCdExIR6CAIIHp2tPlRgjjVAbOTrWS-xq6SvsgpcJ4DFQ41GRaswawvybmuBg/s320/IMG_0009.PNG" width="214" /></a></div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;"><b>Actualización:</b> Ha aparecido otra aplicación gratuita en iTunes Store que también permite leer libros ePub o PDF protegidos con ADEPT. Su nombre es Bluefire Reader (http://itunes.apple.com/es/app/bluefire-reader/id394275498?mt=8) y es algo más sencilla de usar.<br />
<br />
La primera vez que se lance, teniendo conexión con internet, tendremos que introducir los datos de la cuenta de Adobe. A partir de ese momento, se podrán sincronizar los libros que queramos, por ejemplo a través de iTunes. Bastará con elegir Bluefire Reader en la lista que aparece debajo de "Compartir Archivos" en la pestaña de aplicaciones de iTunes.<br />
<br />
</div></div><div><div style="text-align: justify;">En la siguiente entrada veremos otro sistema que elimina las restricciones de la protección, haciendo posible abrir el libro en cualquier programa o app que pueda leer archivos ePub, o incluso convertir el ePub a otro formato.</div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-31976750365608473722010-06-18T13:42:00.000+02:002010-06-18T13:42:14.841+02:00Cómo crear un dispositivo USB de inicio de Syslinux compatible con Windows PE<div style="text-align: justify;"><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Esta es la segunda parte de dos entradas explicando cómo hacer que funcionen discos USB de inicio que no utilicen Mac OS X para arrancar. Ahora hablaremos de cómo usar SysLinux para crear un menú de arranque con varias opciones, integrando en el mismo el arranque de Windows PE que habíamos hecho en <a href="http://kounch-mac.blogspot.com/2010/06/como-crear-un-dispositivo-usb-de-inicio.html">la entrada anterior</a>.</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"></span></span></div><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><a name='more'></a></span><br />
<div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; font-size: medium; font-weight: bold;">Elementos necesarios para crear el dispositivo de arranque:</span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">VMWare Fusion o BootCamp</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Windows instalado (o el mismo USB de Windows PE que habíamos creado), o Linux (instalado o en un CD "Live")</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Dispositivo USB de almacenamiento compatible</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><a href="http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project">SysLinux</a></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span> </div><h3><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-size: x-large;">Instrucciones:</span></span></span></h3><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Si este USB es nuevo, siguen siendo válidas las recomendaciones de la entrada anterior acerca de la compatibilidad para el arranque. Nosotros vamos a suponer que tenemos el mismo dispositivo que usamos la vez anterior, y que tiene Windows PE instalado.</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span> </div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Conectamos el dispositivo USB al Mac, y abrimos la aplicación Terminal. Vamos a "pelar" el sector de arranque de Windows PE a un fichero. Para ello, localizaremos el identificador de disco, por ejemplo usando el comando diskutil:</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">$ diskutil list</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">/dev/disk0</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> #: TYPE NAME SIZE IDENTIFIER</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 0: GUID_partition_scheme *250.1 GB disk0</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 1: EFI 209.7 MB disk0s1</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 2: Apple_HFS Macintosh HD 215.8 GB disk0s2</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 3: Microsoft Basic Data Windows 33.9 GB disk0s3</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">/dev/disk1</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> #: TYPE NAME SIZE IDENTIFIER</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 0: Apple_partition_scheme *250.1 GB disk1</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 1: Apple_partition_map 32.3 KB disk1s1</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 2: Apple_HFS Datos 249.9 GB disk1s3</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">/dev/disk2</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> #: TYPE NAME SIZE IDENTIFIER</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 0: Apple_partition_scheme *500.1 GB disk2</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 1: Apple_partition_map 32.3 KB disk2s1</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 2: Apple_HFSX Time Machine 500.0 GB disk2s2</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">/dev/disk3</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> #: TYPE NAME SIZE IDENTIFIER</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 0: FDisk_partition_scheme *4.2 GB disk3</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 1: DOS_FAT_32 UNTITLED 4.2 GB disk3s1</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span> </div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">En este caso, por ejemplo, vemos que se trata el disco 3, así que ahora, usando </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">dd</span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">, copiamos los primeros 512 bytes, donde está el sector de arranque:</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">dd if=/dev/disk3s1 of=pe2.bss bs=512 count=1</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span> </div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Si hubiéramos querido hacer esto desde Linux habría sido similar (ajustando el disco de origen). Desde Windows también se podría hacer, pero usando </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><a href="http://www.nu2.nu/mkbt/">mkbt.exe</a></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">:</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span style="font: normal normal normal 12px/normal 'Courier New';"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">mkbt -c -x letra: .\pe2.bss</span></span></span><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> (donde "letra" es la unidad USB)</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span> </div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Ahora copiamos el archivo con el sector de arranque (</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">pe2.bss</span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">) al dispositivo USB, por ejemplo, en un nuevo directorio que llamaremos "</span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">syslinux</span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">".</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span> </div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Tambíen creamos un fichero de texto con la configuración para SysLinux, en la raíz del dispositivo, y que llamaremos </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">syslinux.cfg</span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">. El fichero debe contener, al menos, algo como lo siguiente:</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">LABEL winpe</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> MENU LABEL Windows PE</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> KERNEL /syslinux/pe2.bss</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> APPEND -</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> TEXT HELP</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> Arranque de Windows PE</span></span></div><div style="font: 12.0px 'Courier New'; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> ENDTEXT</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span> </div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Es importante señalar, sobre todo si se usan acentos, en el fichero de configuración, que la codificación de texto es de MS-DOS - Occidental (DOS Latino 1).</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span> </div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Descomprimimos el archivo de SysLinux, localizaremos el ejecutable de Windows (normalmente en el directorio win32), y lo copiaremos en el dispositivo USB. Esto es para arrancar después desde el USB y hacer la instalación. También es posible hacerlo directamente desde Linux, con el ejecutable correspondiente, o desde una instalación de Windows (en VMWare o Boot Camp).</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span> </div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Arrancamos desde el USB (que aún tiene Windows PE) e instalamos SysLinux; desde el directorio donde hubiéramos copiado </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">syslinux.exe</span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> (o bien desde la instalación de Windows o Linux, claro):</span></span></div><div style="font: 12.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">> syslinux.exe –f -m –d syslinux letra:</span></span><span style="font: normal normal normal 12px/normal Helvetica;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> (donde "letra" es la unidad USB)</span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><br />
</div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"> </div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Esto reajustará el MBR y cambiará el sector de arranque, borrando el que había previamente de Windows PE. El proceso funciona sin problemas aunque hubiéramos arrancado desde Windows PE, porque este utiliza un disco RAM para funcionar, por lo que el dispositivo original de arranque queda libre completamente. De hecho, una vez iniciado Windows PE, podemos desconectar el USB y seguir trabajando únicamente con el disco en memoria.</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></span> </div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Ahora es posible ampliar la configuración de </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">syslinux.cfg</span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> incluyendo otras entradas, por ejemplo, usando memdisk para cargar una imagen de disquete, o instalando versiones de Linux Live como SystemRescueCD o Geexbox. También es posible crear un menú de inicio gráfico con la extensión </span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">vesamenu.c32</span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">.</span></span></div><div><br />
</div></div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4093323652903426539.post-38554941618368882082010-06-06T12:33:00.000+02:002010-06-06T12:33:17.927+02:00Instalación de DevkitARM nativo para Mac OS X junto con SDL de GP32<div style="text-align: justify;">(Esta entrada fue publicada originalmente en el <a href="http://wiki.gp32spain.com/index.php/Instalaci%C3%B3n_de_DevkitARM_nativo_para_Mac_OS_X_junto_con_SDL_de_GP32">wiki de GP32Spain</a>)</div><div style="text-align: justify;"><br />
</div><br />
<div style="text-align: justify;">Estos son los pasos a seguir para compilar, prácticamente desde cero, un entorno de desarrollo para Mac OS X. De esta manera se garantiza que el compilador aprovecha efectivamente el tipo de procesador que tenga el Mac. Para poder seguirlos adecuadamente, se debe tener un conocimiento del trabajo con línea de comandos en entornos UNIX/Linux, ya que casi todos los pasos deben realizarse desde la aplicación Terminal de Mac OS X u otra aplicación de similar (xterm, etc). El script de compilación está pensado para ejecutarse sobre BASH.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"> Este procedimiento se ha utilizado con éxito para preparar entornos de compilación en ordenadores Apple Macintosh con procesador Intel o PowerPC, y con Mac OS X Tiger (10.4.11) o Leopard (10.5.1).</div><div><a name='more'></a><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Instrucciones para compilar el entorno de desarrollo básico</span></div><div style="text-align: justify;"><ul><li>Instalar las herramientas gratuitas de desarrollo de Apple, que vienen incluidas con los discos de instalación del sistema operativo, o se pueden descargar desde http://developer.apple.com/tools/xcode/</li>
<li>Obtener el script oficial de compilación de devkitARM (versión antigua y última versión), desde la página oficial en http://downloads.sourceforge.net/devkitpro/buildscripts.tar.bz2?modtime=1108388392 y http://downloads.sourceforge.net/devkitpro/buildscripts-20060724.tar.bz2</li>
<li>(Opcional si se tiene instalado wget) Obtener el código fuente de las herramientas necesarias (binutils, gcc, etc.) en http://ftp.gnu.org/gnu/binutils/binutils-2.15.tar.bz2 y ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-3.4.3/gcc-core-3.4.3.tar.bz2 y ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-3.4.3/gcc-g++-3.4.3.tar.bz2 y http://osdn.dl.sourceforge.net/sourceforge/devkitpro/libogc-src-20050121.tar.bz2 y ftp://sources.redhat.com/pub/newlib/newlib-1.12.0.tar.gz</li>
<li>Obtener SDL precompiladas para GP32 y ejemplos en http://downloads.sourceforge.net/sdl-gp32/sdl4gp32-precompiled-28082005.tar.bz2 y http://downloads.sourceforge.net/sdl-gp32/examples-src-28082005.tar.bz2</li>
<li>Crear una imagen de disco, al menos de 650MBytes de espacio y con soporte para mayúsculas y minúsculas (necesario para que funcionen bien las utilidades basadas en Linux)</li>
</ul></div><div style="text-align: justify;"> <div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> hdiutil create -size 650M -fs HFSX -volname gp32SDKbuild -partitionType Apple_HFS -attach gp32SDKbuild</div><div style="font: 13.0px Helvetica; line-height: 19.0px; margin: 0.0px 0.0px 6.0px 0.0px; min-height: 16.0px;"></div><ul><li><span class="Apple-style-span" style="font-family: Times; font-size: medium;">Copiar al nuevo disco, en un directorio llamado files, los archivos que se han bajado</span></li>
<li><span class="Apple-style-span" style="font-family: Times; font-size: medium;">Iniciar Terminal y compilar devkitARM en la imagen de disco:</span></li>
</ul></div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> cd /Volumes/gp32SDKbuild</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> mkdir src</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> cd src</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> tar xjf /Volumes/gp32SDKbuild/files/buildscripts.tar.bz2 </div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> cd buildscripts</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> ./build-devkit.sh </div></div><div style="text-align: justify;"><ul><li>Responder a las preguntas del script:</li>
</ul></div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> This script will build and install your devkit. Please select the one you require</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> 1: build devkitARM (gba gp32)</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> 2: build devkitPPC (gamecube)</div><div><ul><li>Responder 1, para compilar las herramientas de GP32:</li>
</ul></div></div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> The installation requires binutils-2.15, gcc3.4.3 and newlib-1.12.0. Please select an option:</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> 1: I have already downloaded the source packages</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> 2: Download the packages for me (requires wget)</div></div><div style="text-align: justify;"><ul><li>Responder 1 si se han bajado los archivos necesarios (binutils, gcc, etc.), por ejemplo de una compilación anterior, o 2 si no se dispone de ellos (ojo, que la descarga sólo funciona si se ha instalado wget, que no está instalado por defecto en OS X).</li>
</ul></div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> Please enter the directory where you would like 'devkitARM' to be installed:</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> for mingw/msys you must use <drive>:/<install path=""> or you will have include path problems</install></drive></div></div><div style="text-align: justify;"><ul><li>Introducir el directorio de la imagen de disco (en este ejemplo /Volumes/gp32SDKbuild).</li>
</ul></div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> Please enter the path to the directory that contains the source packages:</div><div><span class="Apple-style-span" style="font-family: Courier; font-size: x-small;"><span class="Apple-style-span" style="font-size: 10px;"><br />
</span></span></div></div><div style="text-align: justify;"><ul><li>Si se habían bajado ya los archivos necesario (binutils, gcc, etc.) indicar dónde se encuentran (por ejemplo /Volumes/gp32SDKbuild/files).</li>
</ul></div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> Ready to install devkitARM in /Volumes/gp32SDKbuild</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> press return to continue</div></div><div style="text-align: justify;"><ul><li>Pulsar Enter. A continuación comenzará el proceso de compilación, tomárselo con calma, ya que puede llevar desde varios minutos hasta más de dos horas si el ordenador es antiguo.</li>
</ul></div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> ...</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> Would you like to delete temporary files? [Y/n]</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> y</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> Would you like to delete the source directories? [Y/n]</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> y</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> Would you like to delete the source packages? [y/N]</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> N</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> note: Add the following to your PATH variable; /Volumes/gp32SDKbuild/bin</div></div><div style="text-align: justify;"><ul><li>Compilar la utilidad b2fxec, usando los fuentes de los últimos scripts de devkitARM:</li>
</ul></div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> cd /Volumes/gp32SDKbuild/src</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> rm -rf buildscripts/*</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> tar xjf /Volumes/gp32SDKbuild/files/buildscripts-20060724.tar.bz2</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> cd tools/gp32/b2fxec </div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> make</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> cp b2fxec /Volumes/gp32SDKbuild/bin</div><div><br />
</div><div>Normalmente no se produce ningún error, y ahora, para poder compilar, basta con:</div></div><div style="text-align: justify;"><ul><li>Montar la imagen de disco</li>
<li>Ajustar PATH para que incluya <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/Volumes/gp32SDKbuild/bin</span> (o la ruta equivalente si el disco se monta en otra ruta distinta)</li>
<li>Preparar Makefile para que use arm-elf como arquitectura</li>
</ul></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Instrucciones para instalar las SDL precompiladas y los ejemplos</span></div><div style="text-align: justify;"><ul><li>Descomprimir la versión precompilada de SDL</li>
</ul></div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> cd /Volumes/gp32SDKbuild</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> mkdir sdl</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> cd sdl</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> tar xjf /Volumes/gp32SDKbuild/files/sdl4gp32-precompiled-28082005.tar.bz2 </div></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Ahora, para poder compilar usando SDL, basta con:</div><div style="text-align: justify;"><ul><li>Montar la imagen de disco</li>
<li>Ajustar PATH para que incluya <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/Volumes/gp32SDKbuild/bin</span> (o la ruta equivalente si el disco se monta en otra ruta distinta)</li>
<li>Preparar Makefile para que use arm-elf como arquitectura, y Volumes/gp32SDKbuild/sdl como ruta extra para incluir archivos y librerías</li>
</ul></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Instrucciones para comprobar los ejemplos</span></div><div style="text-align: justify;"> Seguir los siguientes pasos para comprobar que los ejemplos compilan correctamente (y por lo tanto el entorno funciona):</div><div style="text-align: justify;"><ul><li>Descomprimir los ejemplos</li>
</ul></div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> cd /Volumes/gp32SDKbuild/src</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> tar xjf /Volumes/gp32SDKbuild/files/examples-src-28082005.tar.bz2 </div></div><div style="text-align: justify;"><ul><li>Editar el archivo Makefile de uno cualquiera de los ejemplos, cambiando</li>
</ul></div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> CC = arm-elf-gcc</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> AS = arm-elf-as</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> LD = arm-elf-ld</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> OBJCOPY = arm-elf-objcopy</div></div><div style="text-align: justify;">por</div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> GP32PATH = /Volumes/gp32SDKbuild/sdl</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> DEVKITPATH = /Volumes/gp32SDKbuild </div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 12.0px;"><br />
</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> CC = $(DEVKITPATH)/bin/arm-elf-gcc</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> AS = $(DEVKITPATH)/bin/arm-elf-as</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> LD = $(DEVKITPATH)/bin/arm-elf-ld</div><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> OBJCOPY = $(DEVKITPATH)/bin/arm-elf-objcopy</div></div><div style="text-align: justify;"><ul><li>Abrir Terminal, ir al directorio donde se encuentra el ejemplo modificado y compilar</li>
</ul></div><div style="text-align: justify;"><div style="background-color: #f9f9f9; font: 10.0px Courier; line-height: 11.0px; margin: 0.0px 0.0px 0.0px 0.0px;"> make</div></div><div style="text-align: justify;"><ul><li>Copiar el archivo FXE que se haya creado nuevo (y los archivos auxiliares si los hubiera) al directorio GPMM de una tarjeta SD, y comprobar en la consola que el ejemplo funciona.</li>
</ul></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-31298654714230021852010-06-04T23:14:00.003+02:002010-06-04T23:17:27.993+02:00Cómo crear un dispositivo USB de inicio de Windows PE y hacer que arranque en un Mac<div style="text-align: justify;">Esta es la primera parte de dos entradas explicando cómo hacer que funcionen discos USB de inicio que no utilicen Mac OS X para arrancar. Comenzaremos usando Windows PE y, la siguiente vez, hablaremos de syslinux.</div><br />
<a name='more'></a><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Elementos necesarios para crear el dispositivo de arranque</span>:</div><div style="text-align: justify;">VMWare Fusion o BootCamp</div><div style="text-align: justify;">Windows Vista, Windows 2008 Server o Windows 7 instalado</div><div style="text-align: justify;">Software de inicio de Windows PE</div><div style="text-align: justify;">Dispositivo USB de almacenamiento compatible</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Elementos necesarios para iniciar un Mac desde USB:</span></div><div style="text-align: justify;">CD-R</div><div style="text-align: justify;">PLoP Boot Manager</div><div style="text-align: justify;">Dispositivo USB de inicio</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Instrucciones:</span></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Lo primero que se debe tener en cuenta es que no todos los dispositivos USB de almacenamiento sirven para arrancar un ordenador personal. Por ejemplo, está comprobado que reproductores de MP3 de "marca blanca" que se ven al conectarlos al ordenador como un disco y un CD-ROM, no funcionan. Por lo tanto, antes de empezar, es interesante hacer un poco de investigación on-line y asegurarse que que se va a utilizar algo que funcione.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Comenzaremos explicando cómo instalar <a href="http://www.microsoft.com/spain/licencias/sa/winpe.mspx">Windows PE</a> en primer lugar ya que es muy fácil después "ampliar" las opciones de inicio del USB utilizando un menú y <a href="http://syslinux.zytor.com/">Syslinux</a>, pero hacerlo en sentido contrario es un poquito más complicado.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Lógicamente, para poder instalar Windows PE debemos disponer una copia del mismo como, por ejemplo, la que viene incluida con el kit de instalación automatizada de Windows (AIK) de Windows Vista o Windows 7 (<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=696dd665-9f76-4177-a811-39c26d3b3b34&displaylang=es">descarga gratuita</a> si se dispone de una instalación legítima de Windows), o el kit de preinstalación OEM de Windows.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Para crear los archivos de Windows PE teniendo instalado OPK de Windows o WAIK se deben seguir estos pasos:</div><div style="text-align: justify;"></div><ul><li>Hacer clic en Inicio, seleccionar Todos los programas, OPK de Windows o AIK de Windows y, a continuación, elegir Símbolo del sistema de herramientas de Windows PE.</li>
<li>Crear un directorio donde preparar los archivos de Windows PE, por ejemplo:</li>
</ul><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">>mkdir D:\winPE</span><br />
<ul><li>Se abre una ventana del símbolo del sistema, ejecutar el script Copype.cmd.</li>
</ul><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">>copype.cmd x86 c:\winpe_x86</span><br />
<div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Estos archivos se pueden personalizar, modificando el arranque, añadiendo utilidades o ajustando la configuración de idioma. La documentación incluída con AIK y OPK es bastante completa</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Los pasos entonces, para preparar el USB, son los siguientes:</div><div style="text-align: justify;"></div><ul><li>Iniciar Windows (Vista, 2008 Server o 7), bien en la máquina virtual o bien usando BootCamp</li>
<li>Conectar el USB.</li>
<li>Abrir una ventana de comandos con privilegios de administrador y lanzar</li>
</ul><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">>diskpart.exe</span><br />
<ul><li>Localizar el número correspondiente al USB usando:</li>
</ul><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">diskpart list disk</span><br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHVlPyJfZYNrb5nQJaxOfZJfLoaOw-R24GYY_1K10bboER6Kg5Wrn0mKr9VpF7M0E92viHP6lzvc1d3xMlR1AGZODqQY9k3PVxdJn9P-_UIXvz-bkp8ArbWWCLozItU6RMGd_s4AOfEPo/s1600/Captura+de+pantalla+2010-06-04+a+las+21.49.27.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHVlPyJfZYNrb5nQJaxOfZJfLoaOw-R24GYY_1K10bboER6Kg5Wrn0mKr9VpF7M0E92viHP6lzvc1d3xMlR1AGZODqQY9k3PVxdJn9P-_UIXvz-bkp8ArbWWCLozItU6RMGd_s4AOfEPo/s400/Captura+de+pantalla+2010-06-04+a+las+21.49.27.png" width="400" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />
</span></div><ul><li>Formatear el USB con los siguientes comandos (en el ejemplo el disco es el 2):</li>
</ul><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">diskpart</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">select disk 2</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">clean</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">create partition primary</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">select partition 1</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">active</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">format fs=fat32</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">assign</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">exit</span></div><div style="text-align: justify;"></div><ul><li>Copiar los archivos de Windows PE en el disco (en este ejemplo, están en D:\winPE y la unidad USB en F:):</li>
</ul><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">>xcopy D:\winPE\iso\*.* /s /e /f F:\</span></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Así tendríamos un dispositivo de inicio USB que debería funcionar en la mayoría de los ordenadores PC compatibles modernos, configurando su BIOS para arrancar por USB. Sin embargo, en el caso de un Mac esto no tiene por qué funcionar. Aunque todos los Mac basados en Intel pueden arrancar desde USB, esta funcionalidad está pensada para lanzar Mac OS X, y no otros sistemas operativos.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Para poder solucionarlo, los pasos son bastante sencillos:</div><div style="text-align: justify;"></div><ul><li>Grabar la imagen ISO de <a href="http://www.plop.at/en/bootmanager.html">PloP Boot Manager</a> en un disco</li>
<li>Iniciar el mac con dicho disco</li>
<li>Conectar el dispositivo USB</li>
<li>Elegir la opción USB en PloP Boot Manager</li>
</ul><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSIf-ZOmFhb4I68UQP_zupvvUKyH5Ofitl-JLcBvGO4VsBjRlD9E2UbP6MfUE-eT4WKCLhzesCxIuGUkWvnhUuuhlZHsFUZ8SDh0ZyCF4mMqhNYk7B9RFTwi6KKa7hDmY9s9FsRhdBBM8/s1600/Captura+de+pantalla+2010-06-04+a+las+21.36.07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSIf-ZOmFhb4I68UQP_zupvvUKyH5Ofitl-JLcBvGO4VsBjRlD9E2UbP6MfUE-eT4WKCLhzesCxIuGUkWvnhUuuhlZHsFUZ8SDh0ZyCF4mMqhNYk7B9RFTwi6KKa7hDmY9s9FsRhdBBM8/s400/Captura+de+pantalla+2010-06-04+a+las+21.36.07.png" width="400" /></a></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Si todo se ha hecho correctamente, deberíamos ver el proceso de arranque de Windows PE.</div><div style="text-align: justify;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyN3EuHTHVftxk5iu_v7YN-WxguZu4hs1_sLGD1CsNG6fYcHuBgi1TFS5uY2qFodA15OD1fUQRqIQn9RDIWqIzp9yMzVFjCON9Nac6sb9fy4FoiLQ4YyiQWUDm_q8olhenwSfX8QsrbLs/s1600/Captura+de+pantalla+2010-06-04+a+las+21.36.45.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyN3EuHTHVftxk5iu_v7YN-WxguZu4hs1_sLGD1CsNG6fYcHuBgi1TFS5uY2qFodA15OD1fUQRqIQn9RDIWqIzp9yMzVFjCON9Nac6sb9fy4FoiLQ4YyiQWUDm_q8olhenwSfX8QsrbLs/s320/Captura+de+pantalla+2010-06-04+a+las+21.36.45.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvQORf-iP8y9Yw68qrES7m3mbsWrKGoeTZKiLZEkZbRjhWiysINKk7ukFPKLOAIkuD7tDdv6uAPH588F_XjDtGSko59BIASV4757Jnz5NEpOsXKf5tsGUEfExBjCoRW8pM9UVZ6nO0ZQw/s1600/Captura+de+pantalla+2010-06-04+a+las+21.37.23.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvQORf-iP8y9Yw68qrES7m3mbsWrKGoeTZKiLZEkZbRjhWiysINKk7ukFPKLOAIkuD7tDdv6uAPH588F_XjDtGSko59BIASV4757Jnz5NEpOsXKf5tsGUEfExBjCoRW8pM9UVZ6nO0ZQw/s320/Captura+de+pantalla+2010-06-04+a+las+21.37.23.png" /></a></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Este procedimiento también es útil para iniciar desde un dispositivo USB una máquina virtual de VMware Fusion.</div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4093323652903426539.post-15795622208576142702010-05-29T00:30:00.001+02:002010-05-29T00:30:52.843+02:00Digitalizando cintas de ZX Spectrum en Mac OS X (II)<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: x-large;">Introducción</span></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">En esta segunda parte hablaremos de cómo digitalizar (es decir, convertir en un archivo de datos del ordenador que no sea de audio) el contenido de cintas que tengan programas tanto que usen el sistema de carga original del Spectrum como aquellos programas que usen sistemas de protección o carga “turbo”.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><a name='more'></a><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: x-large;">Material necesario</span></span></div><div style="text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">•</span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Cinta de audio de Spectrum</span></div><div style="text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">•</span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Reproductor de cintas</span></div><div style="text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">•</span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Cable para conectar el reproductor al ordenador</span></div><div style="text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">•</span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Audacity para Mac OS X (http://audacity.sourceforge.net/)</span></div><div style="text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">•</span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Emulador Boxer de DOS para Mac OS X (http://boxerapp.com/)</span></div><div style="text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">•</span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Taper para DOS (http://www.worldofspectrum.org/taper.html)</span></div><div style="text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">•</span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">DOS/4GW (http://tenberry.com/dos4g/watcom/index.html)</span></div><div style="text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">•</span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span></span><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Emulador de Spectrum para Mac OS X con soporte para archivos TZX (opcional)</span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"></span></div><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"></span><br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: x-large;">Instrucciones para preparar el entorno</span></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Por desgracia, el mejor programa de los que conocemos para importar datos de una cinta, Taper, sólo existe para el sistema DOS, sin embargo, por suerte, este programa funciona correctamente bajo emulación, así que lo primero que haremos (y sólo será necesario hacerlo una vez), es preparar un entorno de emulación para usar Taper.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Descomprimimos el archivo de Taper, y añadimos a la carpeta el ejecutable de DOS/4GW:</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4eqWJEflfO-eIbvRuHXvl_NyhW2V9jY1GJVI4r1BPWO5IwkhasFfefUNQbeHxIa82uXdzYI4k5J2BVtW5ACy9I0fyPG93uYqmy19ClICsiP-SO0sKCdp8Stz2YuooHk0c6jPPu3mvHUU/s1600/imagen06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4eqWJEflfO-eIbvRuHXvl_NyhW2V9jY1GJVI4r1BPWO5IwkhasFfefUNQbeHxIa82uXdzYI4k5J2BVtW5ACy9I0fyPG93uYqmy19ClICsiP-SO0sKCdp8Stz2YuooHk0c6jPPu3mvHUU/s320/imagen06.png" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> Ahora, tras haber instalado Boxer (yo he usado la versión 0.87), arrastramos la carpeta completa de Taper sobre el instalador de programas:</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk1sD0Vu90N1BxvRnBFxDmLTxBSAVslXXvsp6nfxUwhM4eP_uZ-IaaAGdFbVJp66wIi6tfOYG3w911yMvyKiKdlR6DI7yOmLn-2y-dLToswtza00zxqhL8ZpgVwcuZtwyALI9yh27NB28/s1600/imagen07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk1sD0Vu90N1BxvRnBFxDmLTxBSAVslXXvsp6nfxUwhM4eP_uZ-IaaAGdFbVJp66wIi6tfOYG3w911yMvyKiKdlR6DI7yOmLn-2y-dLToswtza00zxqhL8ZpgVwcuZtwyALI9yh27NB28/s320/imagen07.png" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Puesto que Boxer simula un entorno MS-DOS, y no tiene acceso a visualizar completamente el sistema de archivos de Mac OS X, vamos a crear un directorio para hacer intercambio de archivos y un acceso directo en el Finder para acceder a él.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Abrir el contenido de la aplicación de Boxer que hemos creado con Taper:</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsOTYKggNQWbCQUsM8Eisn2oO3cB114S9pVXpxrw7dO_QdVI0RJEUJLGk22wRq5LshamAF_T62cLULFBJdF4FfGscIktXbVZQ8xjeC9xO7dVMNd-MwDs_XKEiYAdqalfoI0BRviaOspYI/s1600/imagen08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsOTYKggNQWbCQUsM8Eisn2oO3cB114S9pVXpxrw7dO_QdVI0RJEUJLGk22wRq5LshamAF_T62cLULFBJdF4FfGscIktXbVZQ8xjeC9xO7dVMNd-MwDs_XKEiYAdqalfoI0BRviaOspYI/s320/imagen08.png" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Creamos un directorio dentro de la carpeta de Taper (yo lo he llamado “Tapes”) y luego un Alias de esta nueva carpeta en un lugar accesible.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_qtDyM1W1kRdzB4gz68LRcgzVBbm1cKCInBKlquHGdhcG3d8G847OKORDafePopP1r5JP0vn1N-94TsilXunHfe9GauOUGOm8gw4h36SXIGOwgbHEjql21JWdGZxIm6XnPaGE1qmC7IA/s1600/imagen09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_qtDyM1W1kRdzB4gz68LRcgzVBbm1cKCInBKlquHGdhcG3d8G847OKORDafePopP1r5JP0vn1N-94TsilXunHfe9GauOUGOm8gw4h36SXIGOwgbHEjql21JWdGZxIm6XnPaGE1qmC7IA/s320/imagen09.png" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Ahora comprobamos, haciendo doble clic en la nueva aplicación de Boxer que se ha creado, que Taper se lanza correctamente a través de Boxer:</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFjDe2MUzSWPuw1ykNFIFTKXYk6JBorkVog1aPWinXtbCGpQrKu2sZD9SUFHBXwu71WQH0fJyGb806_a3GbLvVUV_S9x1nFvZlUT4u7mACoJhPMTPaaqbMg6C8fAPcm8TSXOzMqY6pD4U/s1600/imagen10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFjDe2MUzSWPuw1ykNFIFTKXYk6JBorkVog1aPWinXtbCGpQrKu2sZD9SUFHBXwu71WQH0fJyGb806_a3GbLvVUV_S9x1nFvZlUT4u7mACoJhPMTPaaqbMg6C8fAPcm8TSXOzMqY6pD4U/s400/imagen10.png" width="400" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Pulsamos en “Quit” y aceptamos para salir de la aplicación. Con esto ya tenemos lo principal para poder digitalizar cintas.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: x-large;">Digitalización de una cinta</span></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Ahora, cuando queramos digitalizar una cinta, el primera paso será capturar el sonido usando el reproductor de cintas, con la cinta dentro, el cable de audio conectado al Mac, y un programa de captura (yo he utilizado Audacity) que esté con las preferencias ajustadas para utilizar como entrada de audio la que tenga conectado el cable de audio.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Una vez capturada la cinta, debemos guardar el archivo de sonido usando un formato sin pérdidas (FLAC, AIF, WAV, etc.), ya que es posible que tengamos que volver sobre el original y aplicar distintos filtros si el sonido de la cinta original presenta algún problema.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Teniendo esta copia de seguridad, procedemos a exportar el archivo de audio en el formato VOC de Creative Labs (mono, sin signo, 8 bit, PCM), ya que es el que necesitamos para usar con Taper.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJd0LcAT3UGQ7wE3IMcHVgNW1pQJg05ZDIPY7aQ52rqFTMpjT91G5NyIuRHT6FZOi_RZtMmxthXbqzpDqKmIDEK41Jd4ZYXbzIJ-yB2HFJHS46Xbjl875iio1r823W2rvAWM2-PFKVHZE/s1600/imagen11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJd0LcAT3UGQ7wE3IMcHVgNW1pQJg05ZDIPY7aQ52rqFTMpjT91G5NyIuRHT6FZOi_RZtMmxthXbqzpDqKmIDEK41Jd4ZYXbzIJ-yB2HFJHS46Xbjl875iio1r823W2rvAWM2-PFKVHZE/s320/imagen11.png" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Dejamos el archivo en el directorio de intercambio que habíamos creado antes, e iniciamos Taper. Haciendo clic con el botón secundario del ratón (Comando+clic), elegimos la opción “Window->Import tape” del menú superior.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_scZ8lfW_h1nVCuu8IgtxIVFVN0ktUuBeSDDcSR2aqfNY2bPXiIwZUnH2AcZEkeQ7Fao3ABR2XMl4BKaeAPJQRwXT01v9yX8A4OFYUO3tQNTREIdQzZyQmy4vEA2htJkj790JmQjKAFE/s1600/imagen12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_scZ8lfW_h1nVCuu8IgtxIVFVN0ktUuBeSDDcSR2aqfNY2bPXiIwZUnH2AcZEkeQ7Fao3ABR2XMl4BKaeAPJQRwXT01v9yX8A4OFYUO3tQNTREIdQzZyQmy4vEA2htJkj790JmQjKAFE/s320/imagen12.png" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">...y cargamos el archivo .VOC que habíamos creado</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF18dheOhdnku7fDZh8VGonoP8a1q-nEXDULEOQag5lQIMk080geeGsxghlH9SBraPPdzthJwa_0EQnZpnmTg5OJS5WpUQoNlUotns9KnFZktjKjVUC81PHCGHXPlMww7gWSGC49joiJQ/s1600/imagen13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF18dheOhdnku7fDZh8VGonoP8a1q-nEXDULEOQag5lQIMk080geeGsxghlH9SBraPPdzthJwa_0EQnZpnmTg5OJS5WpUQoNlUotns9KnFZktjKjVUC81PHCGHXPlMww7gWSGC49joiJQ/s320/imagen13.png" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Al detectar que es un archivo de sonido, el programa nos pedirá, entre otras cosas, que le indiquemos el sistema de protección que tenía la cinta original.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinBuKwX-PDIGNofLWhb0NLqvgi1G3c1roQUn7T7FoZ1b2DsJ1MFs5W1ZrOx2JpRFV8b48-G2Y9O28vPVIww91emk0dnO__CSs88whyphenhyphenhZeMzkz-qcCekHcA1LRgk0V9hkunqXQA7VrXSBo/s1600/imagen14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinBuKwX-PDIGNofLWhb0NLqvgi1G3c1roQUn7T7FoZ1b2DsJ1MFs5W1ZrOx2JpRFV8b48-G2Y9O28vPVIww91emk0dnO__CSs88whyphenhyphenhZeMzkz-qcCekHcA1LRgk0V9hkunqXQA7VrXSBo/s400/imagen14.png" width="382" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Una vez lo hayamos elegido, procederá a analizar el audio e intentar extraer los datos.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn8PJbAWgBs1s1QIdVuuuVMa9EKLwo0ptaIDQ4IiwSGk_WUDJFYRD7Yoj90hrMs-smhDO2CFw-uORm5tUUtttuiKGwURyzxM1yurZ7scBXTQMyMwB_ogh4wmyWzhKGc8ip9a3LhPgg7y4/s1600/imagen15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn8PJbAWgBs1s1QIdVuuuVMa9EKLwo0ptaIDQ4IiwSGk_WUDJFYRD7Yoj90hrMs-smhDO2CFw-uORm5tUUtttuiKGwURyzxM1yurZ7scBXTQMyMwB_ogh4wmyWzhKGc8ip9a3LhPgg7y4/s320/imagen15.png" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Si el audio era de buena calidad y hemos elegido el tipo de protección correcto, el programa mostrará los bloques de datos que haya encontrado, que coincidirán con el original de la cinta (en la captura siguiente observamos el juego Bruce Lee, versión de Erbe para España, perfectamente analizado).</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPXluR65aVwtoRJBQ2PGPfYRCINGbtzs9ARirraVQbA04qmDJ-yNp7pMoG0ASdfxM5-p5IMOUiyF9mOlIEipHaCQNj_193pCyOUIFTcIS_-B0mERq81A7D6ZF7vOhRz-kRYU50sDrIKN0/s1600/imagen16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="307" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPXluR65aVwtoRJBQ2PGPfYRCINGbtzs9ARirraVQbA04qmDJ-yNp7pMoG0ASdfxM5-p5IMOUiyF9mOlIEipHaCQNj_193pCyOUIFTcIS_-B0mERq81A7D6ZF7vOhRz-kRYU50sDrIKN0/s400/imagen16.png" width="400" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Si no se detectara nada o se detectara algo erróneo, se puede borrar todo el contenido de la cinta, volver a cargar el archivo de audio y elegir otras opciones como elegir un tipo distinto de protección o apagar o encender las opciones “Digital Filter”o “Standard Sync”.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Si aún así no se obtuviera nada coherente, habrá que volver al archivo original de audio que guardamos al principio, y probar a aplicar filtros que mejoren la imagen. En Audacity el que mejor resultado me ha dado a mí por el momento es el de reducción de ruido.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Finalmente, si ni siquiera así se obtiene algo, habrá que volver a digitalizar el audio ajustando el volumen, el ecualizador o incluso el azimuth del reproductor de cintas. Hay que notar que, si un Spectrum original (o un emulador cargando directamente desde el reproductor de cintas) no es capaz de cargar el programa, es muy difícil que Taper pueda procesarlo también.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">También es posible que, con un ajuste concreto, se analice bien una parte de la cinta, y con otro distinto, otra parte distinta. En ese caso, lo más cómodo suele ser analizar con el primer ajuste y arrastrar desde la parte izquierda de la ventana (Source Tape) los datos correctos hacia la parte derecha (Destination Tape). </span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsFeI9w2I7uJmWBbKIkW7ir8HXfjRclWw911QvCgZ0h9yIgi0lgZDFqXL3QNun_Xc601gIPTaxzRE8Mmd3XkjNGP5hI39Zpz3S2Tl1CjuZ2Uk_Vx4vUufXGWXNpfHa08SsfdzdeyIGoBg/s1600/imagen17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsFeI9w2I7uJmWBbKIkW7ir8HXfjRclWw911QvCgZ0h9yIgi0lgZDFqXL3QNun_Xc601gIPTaxzRE8Mmd3XkjNGP5hI39Zpz3S2Tl1CjuZ2Uk_Vx4vUufXGWXNpfHa08SsfdzdeyIGoBg/s400/imagen17.png" width="400" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">De esta manera, en la parte derecha (Destination Tape), tras repetir esos pasos con los distintos trozos, tendremos la cinta reconstruida.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Cuando finalmente tengamos toda la información de la cinta, podemos añadirle un poco más de información, como añadir bloques de silencio (o pausa), metadatos correspondientes al título del programa, o incluso carátulas o capturas de pantalla. Para ello se utiliza la opción “Entry->Insert...” del menú de la cinta correspondiente.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8EjMh16WfOPp_5sP8rL9Lh9ow7r06hzUsawpk0Vk6svsOvSVAOdcQjZ0XO9DBY3YMblNJn64ZBEgJVMXzV4XyyTgyKF1YJZcd8JhM98k1wWQYtzX921vOcg80nrhvBO0Zdz5hul-jg4k/s1600/imagen18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8EjMh16WfOPp_5sP8rL9Lh9ow7r06hzUsawpk0Vk6svsOvSVAOdcQjZ0XO9DBY3YMblNJn64ZBEgJVMXzV4XyyTgyKF1YJZcd8JhM98k1wWQYtzX921vOcg80nrhvBO0Zdz5hul-jg4k/s320/imagen18.png" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Finalmente, guardaremos el resultado del trabajo en un <a href="http://www.worldofspectrum.org/TZXformat.html">archivo TZX</a>, usando la opción “Window->Save as...” de la cinta correspondiente.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9gxri8L1TtRVw06iZBZQOz_PJ0YVKnh_sLyxVk1vLAWC9ZnZValSANJtax8eu9EbZvGXzcv14eMtFgXRGoLh6HEQfk1lYTvH5klYC-kfzV5zsktfsHN_KazmGzi9cFStZ2X9VW0Arkww/s1600/imagen19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9gxri8L1TtRVw06iZBZQOz_PJ0YVKnh_sLyxVk1vLAWC9ZnZValSANJtax8eu9EbZvGXzcv14eMtFgXRGoLh6HEQfk1lYTvH5klYC-kfzV5zsktfsHN_KazmGzi9cFStZ2X9VW0Arkww/s320/imagen19.png" /></a></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Este formato se creó para guardar con la máxima fidelidad la información original de la cinta, pero sin utilizar datos de audio digital, que ocuparían mucho más espacio. La mayoría de los emuladores modernos de ZX Spectrum son capaces de entenderlo.</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Y bien, tras haber seguido todos estos pasos, tendremos una copia digital lo más fiel posible a la cinta original. Además de poder utilizarla dentro de un emulador, también será posible volver a convertirla en sonido de gran calidad, e incluso utilizar este para cargarle en un ZX Spectrum original.</span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-45970635066820264862010-05-24T14:52:00.016+02:002010-05-24T17:12:16.768+02:00Cómo preparar vídeo para HTML5<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">En una </span></span><a href="http://kounch-mac.blogspot.com/2010/05/como-compilar-ffmpeg-con-soporte-para.html"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">entrada anterior</span></span></a><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;"> estuvimos viendo cómo preparar ffmpeg para poder codificar vídeo en formato WebM. Ahora veremos cómo utilizarlo para preparar un archivo y ponerlo en una página web, usando HTML5 (con la etiqueta <video>), pero con soporte para navegadores que aún no lo entiendan, usando un reproductor Flash</span>.</span><br />
<a name='more'></a><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span><br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Mientras no se aclare el tema de los formatos de vídeo en HTML5, no va a ser posible tener un único archivo de vídeo que funcione en todos los navegadores. Hasta hace poco, bastaba con preparar el vídeo en dos formatos; contenedor MP4 con vídeo H.264 y audio AAC, y contenedor OGM con vídeo Theora y audio Vorbis (OGG).</span></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">El archivo OGM era el adecuado para ver en Firefox u Opera con HTML5, mientras que el vídeo MP4 nos podía servir para visualizarlo en Google Chrome o Safari directamente con HTML5, así como para usarlo con un reproductor Flash en otros navegadores y también para dispositivos móviles (iPhone, iPad, Android...).</span></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Con la entrada en el juego del formato WebM (con vídeo VP8 y audio OGG), la cosa se complica más, ya que es una nueva opción que será soportada en el futuro por Chrome, Firefox, Internet Explorer y Opera.</span></span></div><div style="text-align: justify;"></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Por lo tanto, pensando en lo que hay ahora y en lo que habrá en el futuro, vamos a preparar el vídeo para los tres tipos de formato: MP4, OGM y WebM.</span></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span></div><div style="text-align: justify;"></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: x-large;">Cómo codificar</span></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Suponiendo que tengamos una versión de ffmpeg con el soporte para todos los formatos que hemos mencionado antes (MP4, H.264, AAC, OGM, Theora, OGG audio, VP8, WebM), estos son los pasos.</span></span></div><ul><li style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Preparar vídeo en MP4. Un comando parecido a este debería bastar:</span></span></li>
</ul><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: medium;">./ffmpeg -i </span></span><b><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: medium;">origen</span></span></b><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: medium;"> -acodec libfaac -ab 128k -ar 44100 -ac 2 -s 640x480 -vcodec libx264 -vpre slow -vpre ipod640 -b 1500k -bt 1500k -aspect 640:480 -threads 0 -f ipod </span></span><b><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: medium;">Destino.mp4</span></span></b></div><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span><br />
<ul><li style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Preparar vídeo en OGM. Un comando parecido a este debería bastar:</span></span></li>
</ul><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: medium;">./ffmpeg -i </span></span><b><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: medium;">origen</span></span></b><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: medium;"> -acodec libvorbis -ab 128k -ar 44100 -ac 2 -s 640x480 -vcodec libtheora -b 1500k -g 300 -aspect 640:480 -f ogg </span></span><b><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: medium;">Destino.ogg</span></span></b></div><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> </span><br />
<ul><li style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Preparar vídeo en WebM. Un comando parecido a este debería bastar:</span></span></li>
</ul><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: medium;">./ffmpeg -i </span></span><b><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: medium;">origen</span></span></b><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: medium;"> -acodec libvorbis -ab 128k -ar 44100 -ac 2 -s 640x480 -vcodec libvpx_vp8 -vpre 720p -b 1500k -bt 1500k -aspect 640:480 -f webm </span></span><b><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: medium;">Destino.webm</span></span></b></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: large;"><b><br />
</b></span></span><br />
<b><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Notas:</span></span></b></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">El ejemplo que he puesto parte de un vídeo a 640x480. Habría que ajustar el tamaño si fuera uno distinto (en los parámetetros <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">-s 640x480</span> y <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">-aspect 640:480</span>), así como la velocidad de bits aumentándola o disminuyéndola adecuadamente (en los parámetros <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">-b 1500k</span> y <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">-bt 1500k</span>).</span></span></div><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><br />
</span><br />
<div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: x-large;">Insertando el vídeo en HTML</span></span></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Si simplemente se tratara de insertar el vídeo usando HTML5, bastaría con algo del tipo:</span></span></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"><pre style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: #f0f0f0; background-image: initial; background-position: initial initial; background-repeat: initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-family: arial; height: auto; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">
<video id="video" width="640" height="480" autobuffer>
<source src="http://web/Destino.mp4" type="video/mp4">
<source src="http://web/Destino.webm" type="video/webm">
<source src="http://web/Destino.ogg" type="video/ogg">
</video> </code></pre><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Pero también queremos que el sistema "degrade" automáticamente si no hay soporte para HTML5, y utilice un reproductor Flash. Puestos entonces a meter más código, y habiendo ya varios proyectos de reproductores usando JavaScript que amplían las posibilidades, hemos elegido </span></span><a href="http://videojs.com/"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Video JS</span></span></a><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;"> para este caso (a la espera de que </span></span><a href="http://jilion.com/sublime/video"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">SublimeVideo</span></span></a><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;"> esté terminado, que también tiene muy buena pinta).</span></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: large;"><br />
</span></span></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Se complica todo un poco más, pero tampoco demasiado. Tendremos que añadir a las cabeceras de la página las referencias al código JavaScript (<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">video.js</span>) y la hoja de estilos donde se personalizan los controles (<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">video-js.css</span>). Una vez hecho esto, la forma de ampliar el código sería la siguiente:</span></span></div><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: arial; white-space: pre-wrap;"></span></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><pre style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: #f0f0f0; background-image: initial; background-position: initial initial; background-repeat: initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-family: arial; height: auto; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> <div class="video-js-box">
<video id="video" class="video-js" width="640" height="480" autobuffer>
<source src="http://web/Destino.mp4" type="video/mp4">
<source src="http://web/Destino.webm" type="video/webm">
<source src="http://web/Destino.ogg" type="video/ogg">
<object width="640" height="480" type="application/x-shockwave-flash"
data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"clip":"http://web/Destino.mp4"}' />
<img src="http://web/error.png" width="640" height="480" alt="Poster Image" title="No video playback capabilities." />
</object>
</video>
</div> </code></pre></span><br />
<div style="text-align: justify;"></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: x-large;">Ejemplo</span></span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;">Usando todo lo anterior, aquí podemos ver un ejemplo con un vídeo que grabé hace unas semanas del río Cifuentes en Trillo:</span></span><br />
<br />
</div><div class="video-js-box"><div style="text-align: left;"><video autobuffer="" class="video-js" height="480" id="video" poster="http://www.kounch.com/video/Cascada.png" width="640"><br />
<source src="http://www.kounch.com/video/CascadaHQ.mp4" type="video/mp4"></source><br />
<source src="http://www.kounch.com/video/CascadaHQ.webm" type="video/webm"></source><br />
<source src="http://www.kounch.com/video/CascadaHQ.ogg" type="video/ogg"></source><br />
<object data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" type="application/x-shockwave-flash" width="640" height="480">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value='config={"clip":"http://www.kounch.com/video/CascadaHQ.mp4"}' /><img src="http://www.kounch.com/video/Cascada.png" width="640" height="480" alt="Poster Image" title="No video playback capabilities." /> </object><br />
</video></div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-87189584236583974012010-05-24T10:54:00.002+02:002010-05-24T16:49:16.099+02:00Digitalizando cintas de ZX Spectrum en Mac OS X (I)<div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: x-large;">Introducción</span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">En esta primera parte hablaremos de cómo digitalizar (es decir, convertir en un archivo de datos del ordenador que no sea de audio) el contenido de cintas que tengan programas que usen el sistema de carga original del Spectrum o con mínimas variaciones. Es decir, que quedan excluidos aquellos programas que usen sistemas de protección o carga “turbo”, de los que hablaremos en el futuro.</span></span></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: large;"></span></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><a name='more'></a></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: x-large;">Material necesario</span></span></span></div><ul><li style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Cinta de audio de Spectrum</span></span></span></li>
<li style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Reproductor de cintas</span></span></span></li>
<li style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Cable para conectar el reproductor al ordenador</span></span></span></li>
<li style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: large;">Emulador zxsp para Mac OS X<span class="Apple-style-span" style="color: #2003a8; font-family: Helvetica; font-size: 12px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"> (</span></span><a href="http://k1.dyndns.org/Develop/projects/zxsp-osx/distributions/"><span style="letter-spacing: 0px; text-decoration: underline;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">http://k1.dyndns.org/Develop/projects/zxsp-osx/distributions/</span></span></span></a><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">)</span></span></span></span></span></li>
<li style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Un programa “copión” de Spectrum (The Key, Vigocopy, MasterCopy, etc.)</span></span></span></li>
</ul><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;"><br />
</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: x-large;">Instrucciones</span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">En primer lugar y antes de comenzar, indicar que los métodos que indicaremos a continuación sólo son útiles si tanto la cinta como el reproductor de cintas funcionan lo suficientemente bien como para poder cargar los programas y usarlos en un ordenador Spectrum original, en otro caso, es muy difícil que la digitalización sea posible (no obstante, en el futuro, dedicaremos una entrada a indicar métodos que, en algunos casos, podrían recuperar parte de la información en el caso de cintas con algún deterioro).</span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Teniendo esto claro, lo primero que tenemos que hacer es preparar el reproductor de cintas, con la cinta dentro, el cable de audio conectado al Mac, y este con las preferencias del sistema ajustadas para utilizar como entrada de audio la que tenga conectado dicho cable.</span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: medium;"><br />
</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Lanzaremos el emulador zxsp y cargaremos el programa “copión”. En nuestro caso utilizamos Vigocopy 2, aunque cualquier otro sería perfectamente válido. Iremos a las opciones del emulador zxsp y activaremos la que permite utilizar la entrada de audio del Mac:</span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><br />
</div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij84ZJFA8ZIiSEoHbIuqhc0aWwd7MtaO6vH_8lzmJ0pw45xR0G_m5GZXyEfIndROgFKuexcSzv-VR7pZljFWMSYoF1wbcwFyQWGMGeCtMgy4CV8HEV3TpVdHmK2DMgI54FCOwnAFydaDg/s1600/Recorte+de+imagen.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij84ZJFA8ZIiSEoHbIuqhc0aWwd7MtaO6vH_8lzmJ0pw45xR0G_m5GZXyEfIndROgFKuexcSzv-VR7pZljFWMSYoF1wbcwFyQWGMGeCtMgy4CV8HEV3TpVdHmK2DMgI54FCOwnAFydaDg/s320/Recorte+de+imagen.png" /></a></div><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: large;"><br />
</span></span><br />
<span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">A continuación indicaremos al “copión” que comience a escuchar la cinta (pulsar “L” en el caso de Vigocopy 2) y pondremos en marcha el reproductor de cintas. Si todo va bien, las diferentes partes del programa se irán cargando:</span></span></span><br />
<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: large;"><br />
</span></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghUWW2REaZtg-7rkFkAKp2uWfJzCpYX3bgi7s02tZ2NigWYcjk2i8Ad3lQdyUfMtzKkZ9Hy5aUV97Mlu4RCyZQAvmZCZbpBZcr-otkMCJ4zKDwFX_kcKjlbdyV9eOyfmc2EzEnC-2q9T4/s1600/Recorte+de+imagen+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghUWW2REaZtg-7rkFkAKp2uWfJzCpYX3bgi7s02tZ2NigWYcjk2i8Ad3lQdyUfMtzKkZ9Hy5aUV97Mlu4RCyZQAvmZCZbpBZcr-otkMCJ4zKDwFX_kcKjlbdyV9eOyfmc2EzEnC-2q9T4/s320/Recorte+de+imagen+2.png" /></a></div><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: large;"><br />
</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: center;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Una vez hayamos cargado todo lo que queramos obtener de la cinta, pararemos el reproductor y preparemos un archivo de cinta (.tap), normalmente vacío, para guardar los datos.</span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Una forma de crear un archivo de cinta vacío es la siguiente; abriremos una ventana de Terminal. En ella usaremos el comando “touch” para crearlo, de la siguiente manera:</span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ touch ruta/nombre.tap</span></span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: large;"><br />
</span></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkwrtnTFOFIvaPPvjRqrPSm-ZKdYOB80TTv4hDsx-UgNPKicmRr6wiuG6AV1mNCz_If5-a2iWyDkVaAd4VQZh225_CGCWIj_kXrmQGQVzJJUNv-YRalsadQei95ULRTbAmdpBQncKT5eA/s1600/Recorte+de+imagen+3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkwrtnTFOFIvaPPvjRqrPSm-ZKdYOB80TTv4hDsx-UgNPKicmRr6wiuG6AV1mNCz_If5-a2iWyDkVaAd4VQZh225_CGCWIj_kXrmQGQVzJJUNv-YRalsadQei95ULRTbAmdpBQncKT5eA/s320/Recorte+de+imagen+3.png" /></a></div></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: center;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Una vez tengamos un archivo de cinta donde guardar, abrimos la ventana del reproductor y grabador virtual de cintas del emulador:</span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsepx0Hk7VT6kuYaPZVlsxjjgMtJXr3Vhuta4cbyiRpSkBXK6O_lCzIjFqX6_qNyF1C76pq-m-jd_2NUBa_jVQHZg_XIKp5tra4f2GY-XypjAyCUt1QRjfL-HISk_dESSSUpKaWv8NIIc/s1600/Recorte+de+imagen+4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsepx0Hk7VT6kuYaPZVlsxjjgMtJXr3Vhuta4cbyiRpSkBXK6O_lCzIjFqX6_qNyF1C76pq-m-jd_2NUBa_jVQHZg_XIKp5tra4f2GY-XypjAyCUt1QRjfL-HISk_dESSSUpKaWv8NIIc/s320/Recorte+de+imagen+4.png" /></a></div></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Ahora, pulsando en el botón del reproductor virtual de cintas, buscaremos el archivo de cinta donde grabar:</span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: center;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5NSAOSeEmbX9hmaO7rUEqsqW9bJgksYVH3YDZxJuYp_M4zAQFG-aglNoQvQto6UYxeS8HyqcvbKRGRulEcfNm_2evq13MoJeGav_Qah69OmPTU5ygdZCe5y62FILLU3qypWzd9haOTb4/s1600/Recorte+de+imagen+5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5NSAOSeEmbX9hmaO7rUEqsqW9bJgksYVH3YDZxJuYp_M4zAQFG-aglNoQvQto6UYxeS8HyqcvbKRGRulEcfNm_2evq13MoJeGav_Qah69OmPTU5ygdZCe5y62FILLU3qypWzd9haOTb4/s320/Recorte+de+imagen+5.png" /></a></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">Ahora ya sólo queda pulsar en el botón de grabación y en el de pausa para comenzar la grabación en el archivo de cinta. Comenzar entonces la grabación desde el programa “copión” (pulsar la tecla “S” en el caso de Vigocopy 2), y esperar mientras se vuelcan los datos.</span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJrKPzYFnCbanwbKG0WP9KOiZMlS700nLisfWTEm6IjKJeDRWWM4Oj08OKQUsUe8onCGcBNzZnzx9t3qEwiId9aAaqO7HUsXddgeFUAqrthg338qqO0J8EcUBAX-oosJ9pcjqK1AQWZt0/s1600/Recorte+de+imagen+6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJrKPzYFnCbanwbKG0WP9KOiZMlS700nLisfWTEm6IjKJeDRWWM4Oj08OKQUsUe8onCGcBNzZnzx9t3qEwiId9aAaqO7HUsXddgeFUAqrthg338qqO0J8EcUBAX-oosJ9pcjqK1AQWZt0/s320/Recorte+de+imagen+6.png" /></a></div><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: large;"><br />
</span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px; text-align: justify;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span style="letter-spacing: 0px;"></span></span></span></div><div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify;"><span style="letter-spacing: 0px;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;">De esta manera, habremos obtenido una copia de toda la información que había en la cinta original. A partir de ahora, si se desea utilizar dichos programas, bastará con lanzar el emulador de Spectrum de nuestra elección y cargar el archivo de cinta.</span></span></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-83825947942289071652010-05-23T23:02:00.010+02:002010-05-24T16:20:12.508+02:00Cómo compilar ffmpeg con soporte para WebM<div style="text-align: justify;">Tras el revuelo levantado con Google y su anuncio de <a href="http://www.webmproject.org/">WebM</a>, el proyecto de contenedor y <a href="http://es.wikipedia.org/wiki/C%C3%B3dec">codec</a> libre de derechos para publicar en web, me doy cuenta de que, por el momento, no hay disponible software para Mac OS X que permita crear vídeos en este formato.</div><div style="text-align: justify;">Sin embargo, sí que está disponible el código fuente y los parches necesarios para compilar tu propia versión, y compruebo que hay los parches necesarios para añadirlo a <a href="http://ffmpeg.org/">ffmpeg</a> y <a href="http://www.mplayerhq.hu/">MPlayer</a> (y por tanto también su parte de codificación - MEncoder).</div><div style="text-align: justify;">Aunque me gusta más MEncoder como software para crear vídeos, ya he vivido antes la experiencia de tener que compilar MPlayer y es bastante más elaborada (debido a las dependencias) que ffmpeg. Por otro lado, aunque ya hay guías, por ejemplo, sobre cómo cocinarlo en Windows, no he podido encontrar ningún sitio donde alguien haya publicado cómo hacerlo en un Mac. Por lo tanto, he dedicado un rato esta tarde a intentarlo, y aquí están los resultados.</div><div style="text-align: justify;">En principio todo esto lo he hecho para, además de ir probando a publicar vídeos con el nuevo formato, comparar los resultados con <a href="http://es.wikipedia.org/wiki/H.264/MPEG-4_AVC">H.264</a>. Es por eso que algunas de las dependencias y pasos que indico no tendrían que ser necesarios si sólo quieres preparar vídeos con WebM.</div><div style="text-align: justify;"><br />
<a name='more'></a><br />
</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><span class="Apple-style-span"><span class="Apple-style-span" style="font-size: x-large;">Objetivo</span></span></div><div style="text-align: justify;">Disponer de una versión compilada de ffmpeg que permita crear vídeos WebM y MP4 (con H.264 para el vídeo y <a href="http://es.wikipedia.org/wiki/Advanced_Audio_Coding">AAC</a> para el audio) de forma que se pueda usar con <a href="http://es.wikipedia.org/wiki/HTML_5">HTML5</a> e incluso añadir soporte para reproducción en Flash si este no funciona. Además, la idea es que dicha versión de ffmpeg tenga enlazada estáticamente la mayor cantidad posible de librerías, para poder transportarla fácilmente a un ordenador que no tenga instalado el entorno de desarrollo ni todas las dependencias necesarias.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><span class="Apple-style-span"><span class="Apple-style-span" style="font-size: x-large;">Requerimientos previos</span></span></div><div style="text-align: justify;"><span class="Apple-style-span">Por suerte, ya tengo instaladas en el ordenador algunas de las librerías que necesito, usando <a href="http://www.macports.org/">MacPorts</a>. Son las siguientes:</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">bzip2</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">dirac</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">faac</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">faad2</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">lame</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">libmatroska</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">libogg</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">libtheora</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">libvorbis</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">x264</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">XviD</span></div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">zlib</span></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Una de las formas más sencillas de conseguir prácticamente todas consiste en instalar la variante de ffmpeg que provee MacPorts, con un comando como el siguiente (siendo usuario administrador):</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ sudo port install ffmpeg</span></div><div style="text-align: justify;">o bien usando <a href="http://porticus.alittledrop.com/">Porticus</a>.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Una vez tengamos preparadas las principales librerías, nos bajamos desde <a href="http://code.google.com/p/webm/downloads/list">la web del proyecto WebM</a> los parches para ffmpeg. Concretamente, yo he usado <a href="http://code.google.com/p/webm/downloads/detail?name=mplayer-vp8-encdec-support-r2.tar.bz2&can=2&q=">la versión r2</a>. Descomprimimos el archivo para tenerlo disponible más adelante.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">También necesitaremos el código fuente de las librerías del codec VP8 y el contenedor WebM. Esto se ha de hacer usando <a href="http://git-scm.com/">git</a>.</div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ git clone git://review.webmproject.org/libvpx.git</span></div></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Aunque yo he utilizado la versión de línea de comandos (instalada con MacPorts) existe la posibilidad de usar <a href="http://search.macupdate.com/search.php?keywords=git&os=mac">otras versiones</a>, algunas con interfaz gráfica y todo.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Finalmente, será necesario obtener la versión correcta del código fuente de ffmpeg. Esto se puede hacer con <a href="http://es.wikipedia.org/wiki/Subversion">SVN</a>:</div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ svn checkout -r 23190 svn://svn.ffmpeg.org/ffmpeg/ ffmpeg</span></div></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">El resultado de todo esto (yo he procurado ponerlo en el mismo directorio) sería el siguiente:</div><div class="separator" style="clear: both; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXEFmUyqUVJH0cdyN3xVVuKjJ4I0Ytwu47ObWTUPr4kT5FX7sSX6rBX8q8C3HLD956DIO5DffttcGHDamkDHhCERftdj8Q93F6E9foA4Alje65l_qQzrCL-8et_DNLhrYk_k4V3r4Of_4/s1600/Captura+de+pantalla+2010-05-23+a+las+22.34.24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXEFmUyqUVJH0cdyN3xVVuKjJ4I0Ytwu47ObWTUPr4kT5FX7sSX6rBX8q8C3HLD956DIO5DffttcGHDamkDHhCERftdj8Q93F6E9foA4Alje65l_qQzrCL-8et_DNLhrYk_k4V3r4Of_4/s320/Captura+de+pantalla+2010-05-23+a+las+22.34.24.png" /></a></div><div class="separator" style="clear: both; text-align: justify;"><br />
</div><div class="separator" style="clear: both; text-align: justify;">Con todo preparado, empezamos.</div><div class="separator" style="clear: both; text-align: justify;"><br />
</div><div class="separator" style="clear: both; text-align: justify;"><br />
</div><div class="separator" style="clear: both; text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Configuración</span></div><div class="separator" style="clear: both; text-align: justify;">En primer lugar, parcheamos el código fuente de ffmpeg para añadir VP8 y WebM:</div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ cd ffmpeg/</span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ cd trunk/</span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/allcodecs-register_VP8.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/allformats-add_webm.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/avcodec-AVCodecContext_add_VP8_specifics.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/avformat-minor_version_bump.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/avcodec-VP8_CODEC_ID.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/avcodec-minor_version_bump.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/libavcodec-build_VP8.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/libavcodec-new_options.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/libavformat-build_webm.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/libvpxdec.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/libvpxenc.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/matroska-add_V_VP8.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/matroskadec-add_webm.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/matroskaenc-add_webm.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/riff-VP80_fourcc.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/ffmpeg-only/configure-libvpx_test.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/ffmpeg-only/documentation-add_VP8__WEBM.diff </span></div><div class="separator" style="clear: both; text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ patch -p0 < ../../mplayer-vp8-encdec-support/ffmpeg-only/ffpresets-libvpx.diff </span></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">A continuación, compilamos las librerías de WebM y VP8:</div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ cd ../..</span></div></div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ cd libvpx</span></div></div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$. /configure --disable-examples</span></div></div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ make</span></div></div><div><div style="text-align: justify;"><div style="text-align: left;">y copiamos los resultados en el directorio de ffmpeg:</div></div></div><div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ mkdir -p ../ffmpeg/trunk/include</span></div></div></div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ cp vp8/*.h ../ffmpeg/trunk/include/</span></div></div></div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ cp vpx_codec/*.h ../ffmpeg/trunk/include/</span></div></div></div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ cp vpx_ports/*.h ../ffmpeg/trunk/include/</span></div></div></div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ mkdir -p ../ffmpeg/trunk/lib</span></div></div></div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ cp libvpx.a ../ffmpeg/trunk/lib</span></div></div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Ahora, para evitar un error en la compilación, editamos el archivo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">ffmpeg/trunk/libavcodec/libvpxenc.c</span> y cambiamos <span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">IMG_FMT_I420</span> por <span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">VPX_IMG_FMT_I420</span>.</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Configuramos ffmpeg:</div></div><div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ cd ../ffmpeg/trunk/</span></div></div></div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ ./configure --prefix=/opt/local --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libvpx-vp8 --enable-libvorbis --enable-libx264 --enable-libtheora --enable-libfaac --enable-runtime-cpudetect --disable-network --disable-devices --extra-cflags="-I/opt/local/include -I./include" --extra-ldflags="-L/opt/local/lib -L./lib"</span></div></div></div><div><div style="text-align: justify;">Notar cómo se indica que debe buscar archivos de cabecera y librerías, además de en los directorios por defecto, en <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/opt/local</span>, que es donde MacPorts guarda los archivos. Esto debería modificarse si las librerías necesarias estuvieran en otro lugar.</div></div><div><div style="text-align: justify;"><br />
</div></div></div><div><div style="text-align: justify;">Finalmente, si queremos enlazar estáticamente la mayor cantidad de librerías, tenemos que editar el archivo <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">ffmpeg/trunk/config.mak<span class="Apple-style-span" style="font-family: Times;"> sustituyendo</span></span></div></div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">EXTRALIBS= -lz -lbz2 -lm -lfaac -ltheoraenc -ltheoradec -logg -lvorbisenc -lvorbis -logg -lvpx -lvpx -lx264 -lm</span></div></div></div><div><div style="text-align: justify;">por </div></div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">EXTRALIBS= /opt/local/lib/libz.a /opt/local/lib/libbz2.a /opt/local/lib/libfaac.a /opt/local/lib/libtheoraenc.a /opt/local/lib/libtheoradec.a /opt/local/lib/libvorbisenc.a /opt/local/lib/libvorbis.a /opt/local/lib/libogg.a ./lib/libvpx.a /opt/local/lib/libx264.a -lm</span></div></div></div><div><div style="text-align: justify;">Notar de nuevo que, si las librerías están en un directorio distinto de <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">opt/local</span>, se debería poner ese.</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Compilación</span></div></div><div><div style="text-align: justify;">Este es, si todo ha salido bien, el paso más fácil:</div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ make</span></div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Si no surge ningún problema, al cabo de un rato tendremos, en el directorio <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">../ffmpeg/trunk/ <span class="Apple-style-span" style="font-family: Times;">tanto el archivo ejecutable <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">ffmpeg<span class="Apple-style-span" style="font-family: Times;"> (para codificar los vídeos) como el reproductor <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">ffplay<span class="Apple-style-span" style="font-family: Times;">. (para poder verlos).</span></span></span></span></span></span></div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, Courier, monospace;"><br />
</span></div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;">Podemos comprobar (en el caso de que lo hayamos configurado así) que los archivos tienen enlazadas de manera estática todas las dependencias posibles, usando el comando</span></span></div></div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: Times, Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ otool -L ffmpeg</span><span class="Apple-style-span" style="font-family: Times;"> </span></span></span></div></div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: Times, Courier, monospace;"><span class="Apple-style-span" style="font-family: Times;"><span class="Apple-style-span" style="font-family: Times;">que debería mostrar un resultado como</span></span></span></div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">ffmpeg:</span></div></div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> </span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1)</span></div></div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">También podemos copiar en <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/opt/local/share/ffmpeg</span> los archivos de preajustes de ffmpeg para VP8:</div></div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ sudo cp ffpresets/libvpx_vp8* /opt/local/share/ffmpeg/</span></div></div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Conclusión</span></div></div><div><div style="text-align: justify;">Si se han seguido todos los pasos (salvo por el detalle de los archivos de preajustes), tendremos unos ejecutables de ffmpeg y ffplay con los que poder convertir desde otros formatos archivos de vídeo a MP4(H.264/AAC) y WebM(VP8/Vorbis), con comandos parecidos a estos:</div></div><div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ ffmpeg -i origen -acodec vorbis -ac 2 -vcodec libvpx_vp8 destino.webm</span></div></div></div><div><div style="text-align: justify;"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">$ ffmpeg -i origen -acodec aac -ac 2 -vcodec libx264 destino.mp4</span></div></div></div><div><div style="text-align: justify;"><div style="text-align: left;"><br />
</div></div></div><div><div style="text-align: justify;"><br />
</div></div><div><div style="text-align: justify;">Es posible que en otra entrada (cuando lo tenga funcionando), explique cómo preparar una página web para usarlos.</div></div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4093323652903426539.post-31055841414444028492010-05-12T00:09:00.001+02:002010-05-24T10:58:28.865+02:00Cómo compilar el entorno de desarrollo completo para GP2X en Mac OS X<span class="Apple-style-span" style="font-size: small; line-height: 24px;">(Esta entrada fue publicada originalmente en el </span><span class="Apple-style-span" style="font-size: small;"><a href="http://wiki.gp32spain.com/index.php/C%C3%B3mo_compilar_el_entorno_de_desarrollo_completo_para_GP2X_en_Mac_OS_X">wiki de GP32Spain</a>)</span><br />
<div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></div></div><div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: small;">Estos son los pasos a seguir para compilar, prácticamente desde cero, un entorno de desarrollo completo para Mac OS X. De esta manera se garantiza que el compilador aprovecha efectivamente el tipo de procesador que tenga el Mac. Para poder seguirlos adecuadamente, se debe tener un conocimiento del trabajo con línea de comandos en entornos UNIX/Linux, ya que casi todos los pasos deben realizarse desde la aplicación Terminal de Mac OS X u otra aplicación de similar (xterm, etc). El script está pensado para trabajar con la shell BASH.</span></div></div><div id="bodyContent"><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;"><br />
<a name='more'></a><br />
</div></div><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">Este procedimiento se ha utilizado con éxito para preparar entornos de compilación en ordenadores Apple Macintosh con procesador:</div><div style="text-align: justify;"></div><ul><li>PowerPC G4</li>
<li>Intel CoreDuo</li>
<li>Intel Xeon</li>
</ul></div><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">Y con el sistema operativo Mac OS X 10.4.x (Tiger) o superior con XCode 2.x o XCode 3.0. Se indica en donde sea apropiado pasos específicos según la versión de XCode utilizada.</div><div style="text-align: justify;"><br />
</div></div><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Instrucciones para compilar el entorno de desarrollo básico</span></div><br />
<ul><li style="text-align: justify;">Instalar las herramientas gratuitas de desarrollo de Apple, que vienen incluidas con los discos de instalación del sistema operativo, o se pueden descargar desde <a href="http://developer.apple.com/tools/xcode/">http://developer.apple.com/tools/xcode/</a></li>
<li style="text-align: justify;">Usando <a href="http://www.macports.org/">MacPorts</a> o <a href="http://www.finkproject.org/">Fink</a>, instalar <i>gawk</i>, <i>wget</i> y <i>subversion</i></li>
<li style="text-align: justify;">Obtener el script oficial del SDK para Linux (<a href="http://dev.gp2x.com/sdk/gp2xsdk_linux.tar.gz">http://dev.gp2x.com/sdk/gp2xsdk_linux.tar.gz</a>) y descomprimirlo en un lugar con espacio suficiente.</li>
<li style="text-align: justify;">Editar buildgp2xtools.sh, con el fin de que soporten Darwin/OS X, cambiando</li>
</ul></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"><div style="text-align: justify;">case $UNAME in</div>CYGWIN*)
<div style="text-align: justify;">USE_CYGWIN="yes"
export</div>export
HOST="i686-pc-cygwin"
;;
<div style="text-align: justify;">"no"
</div>Linux*)
export USE_CYGWIN
=export HOST="i386-linux"
;;
<div style="text-align: justify;"></div>*)
</pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">por</div></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"><div style="text-align: justify;">case $UNAME in</div>CYGWIN*)
<div style="text-align: justify;">USE_CYGWIN="yes"
export</div>export
HOST="i686-pc-cygwin"
;;
<div style="text-align: justify;">"no"
</div>Linux*)
export USE_CYGWIN
=export HOST="i386-linux"
;;
<div style="text-align: justify;">no"
ex</div>Darwin*)
export USE_CYGWIN=
"port HOST=`uname -p`"-apple"
;;
<div style="text-align: justify;"></div>*)</pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">En el caso de que se utilice XCode 3.0 o superior, se deben añadir además modificaciones para poder añadir varios parches necesarios, cambiando</div></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em; text-align: justify;"># download source
</pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">por</div></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"><div style="text-align: justify;"># Leopard patches</div><div style="text-align: justify;"># check binutils patch</div><div style="text-align: justify;">if test ! -f "$PATCHES/Leopard_$BINUTILS.patch" ; then</div>if test ! -f "Leopard_$BINUTILS.patch" ; then
<div style="text-align: justify;">ch";
exit;
else
cp "Leopard_$BINUTILS.pa</div>echo "Error : Not found Leopard binutils.pa
ttch" "$PATCHES";
fi
fi
# check glibc patches
if test $OLDGLIBC = "yes"; then
<div style="text-align: justify;">.patch" ; then
if test ! -f "Leo</div>echo "No Leopard Patch for $GLIBC"
else
if test ! -f "$PATCHES/Leopard_$GLIB
Cpard_$GLIBC.patch" ; then
echo "Error : Not found Leopard glibc.patch";
exit;
else
<div style="text-align: justify;"></div>cp "Leopard_$GLIBC.patch" "$PATCHES";
fi
fi
fi
<div style="text-align: justify;"></div># download sources
</pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">Con el fin de que se copien los parches específicos para XCode 3. Se debe sustituir también</div></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"><div style="text-align: justify;"># extract sources</div><div style="text-align: justify;">mkdir -p "$SOURCE"</div><div style="text-align: justify;">if test ! -d "$SOURCE/$BINUTILS" ; then</div><div style="text-align: justify;">tar -jxvf "$FILES/$BINUTILS.tar.bz2" -C "$SOURCE"</div><div style="text-align: justify;">fi</div></pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">por</div></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"><div style="text-align: justify;"># extract sources</div><div style="text-align: justify;">mkdir -p "$SOURCE"</div><div style="text-align: justify;">if test ! -d "$SOURCE/$BINUTILS" ; then</div><div style="text-align: justify;">tar -jxvf "$FILES/$BINUTILS.tar.bz2" -C "$SOURCE"</div>#Leopard Patch
cd "$SOURCE/$BINUTILS"
<div style="text-align: justify;">S.patch"
fi
</div>patch -p1 < "$PATCHES/Leopard_$BINUTI
<div style="text-align: justify;">L</div></pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">Y además</div></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"><div style="text-align: justify;">else</div><div style="text-align: justify;">patch -p1 < "$PATCHES/$GCC-$GLIBC.patch"</div>fi
<div style="text-align: justify;"></div>fi
</pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">por</div></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"><div style="text-align: justify;">else</div><div style="text-align: justify;">patch -p1 < "$PATCHES/$GCC-$GLIBC.patch"</div>fi
#Leopard Patch
<div style="text-align: justify;">yes"; then
echo "No Leopard P</div>if test $OLDGLIBC =
"atch for $GLIBC"
else
<div style="text-align: justify;">HES/Leopard_$GLIBC.patch"
fi
fi
</div>patch -p1 < "$PAT
<div style="text-align: justify;">C</div></pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">Con el fin de que se apliquen dichos parches.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Por último, se tiene que cambiar</div></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"><div style="text-align: justify;">$SOURCE/$BINUTILS/configure $CROSSBIN --disable-nls</div>make && make install
<div style="text-align: justify;">RGET-ld" && test ! "`$TARGET-ld -v`" ; then
</div>if test ! -f "$PREFIX/bin/$T
A
</pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">por</div></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"><div style="text-align: justify;">$SOURCE/$BINUTILS/configure $CROSSBIN --disable-nls</div>make && make install
#Leopard Fixes
<div style="text-align: justify;">; mv $n ${nn/.dSY</div>cd "$PREFIX/bin"
for n in *.dSYM; do nn=${n
}M/}; done
cd "$PREFIX/$TARGET/bin"
<div style="text-align: justify;">{nn/.dSYM/}; done
cd "$BUILD/binutils"
if test ! -f </div>for n in *.dSYM; do nn=${n}; mv $n
<div style="text-align: justify;">$"$PREFIX/bin/$TARGET-ld" && test ! "`$TARGET-ld -v`" ; then</div></pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">Para corregir un efecto nuevo de XCode 3, que hace que se generen archivos con la extensión dSYM cuando no deberían tener ninguna.</div><br />
<ul><li style="text-align: justify;">Crear una imagen de disco, al menos de 1,5 GBytes de espacio y con soporte para mayusculas y minúsculas (necesario para que compilen bien cosas de Linux)</li>
</ul></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em; text-align: left;">hdiutil create -size 1.5G -fs HFSX -type "SPARSE" -volname gp2xSDKbuild -partitionType Apple_HFS gp2xSDKbuild
</pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">(ajustar el parámetro <i>size</i> al tamaño deseado, en este ejemplo es de 1,5 GBytes). Montar la imagen haciendo doble clic sobre ella una vez se haya generado.</div><div style="text-align: justify;"></div><ul><li>Crear enlaces "falsos" para que compile bien todo</li>
</ul></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"><div style="text-align: justify;">mkdir /Volumes/gp2xSDKbuild/bin</div><div style="text-align: justify;">ln -s /usr/bin/install /Volumes/gp2xSDKbuild/bin/ginstall</div>ln -s /usr/bin/make /Volumes/gp2xSDKbuild/bin/gmake
<div style="text-align: justify;"></div>ln -s /usr/bin/sed /Volumes/gp2xSDKbuild/bin/gsed
</pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">(en el caso de que la imagen se llamara con un nombre distinto de "gp2xSDKBuild", ajustar los enlaces anteriores de forma adecuada)</div><div style="text-align: justify;"></div><ul><li>Ajustar la variable de entorno <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">PATH</span> con estos enlaces</li>
</ul></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em; text-align: justify;">export PATH=/Volumes/gp2xSDKbuild/bin:$PATH
</pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">(en el caso de que la imagen se llamara con un nombre distinto de "gp2xSDKBuild", ajustar <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">PATH</span> de forma adecuada)</div><div style="text-align: justify;"></div><ul><li>Editar buildgp2xtools.sh para apuntar al disco que hemos creado, modificando la variable de entorno <i><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">PREFIX</span></i></li>
</ul></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em; text-align: justify;">export PREFIX="/Volumes/gp2xSDKbuild"
</pre><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">(en el caso de que la imagen se llamara con un nombre distinto de "gp2xSDKBuild", ajustar <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">PREFIX</span> de forma adecuada.</div><div style="text-align: justify;"></div><ul><li>Obtener los parches adecuados para varias de las librerías (que se pueden descargar desde <a href="http://files.me.com/kounch/rtezdt">http://files.me.com/kounch/rtezdt</a> o desde <a href="http://www.gp32spain.com/foros/attachment.php?attachmentid=15637&d=1195407131">http://www.gp32spain.com/foros/attachment.php?attachmentid=15637&d=1195407131</a>), y dejarlos todos en el mismo directorio donde se encuentra el script modificado <i>buildgp2xtools.sh</i> .</li>
<li>Desde la ventana de terminal con el PATH actualizado, situarse en directorio donde esté el script modificado y lanzarlo, usando la opción <i>static</i> si se desea gcc 4.0 o sin opciones si se desea gcc 2.95 (esta segunda posibilidad no suele funcionar con XCode 2.x y parece no funcionar nunca con XCode 3. Se recomienda usar siempre la opción static).</li>
</ul></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em; text-align: justify;">./buildgp2xtools.sh static</pre><span class="Apple-style-span" style="line-height: 24px;"></span><br />
<span class="Apple-style-span" style="line-height: 24px;"></span><br />
<span class="Apple-style-span" style="line-height: 24px;"><ul><li>Esperar un rato, que puede variar entre varios minutos y varias horas, según la potencia del ordenador que se utilice.</li>
</ul></span><br />
<div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">Normalmente no se produce ningún error, y ahora, para poder compilar, basta con: </div><div style="text-align: justify;"></div><ul><li>Montar la imagen de disco</li>
<li>Ajustar PATH para que incluya /Volumes/gp2xSDKbuild/bin (o la ruta equivalente si el disco se monta en otra ruta distinta)</li>
<li>Preparar Makefile para que use <i>arm-gp2x-linux</i> como arquitectura, <i>/Volumes/gp2xSDKbuild/arm-gp2x-linux/include</i> para incluir cabeceras y <i>/Volumes/gp2xSDKbuild/arm-gp2x-linux/lib</i> para enlazar librerías.</li>
</ul><br />
<div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><span class="Apple-style-span" style="font-size: x-large;">Instrucciones para preparar algunas librerías de desarrollo (incluyendo SDL)</span></div><div style="text-align: justify;">A continuación se indica el código fuente completo de un script que permite instalar las siguientes librerías:</div><div style="text-align: justify;"></div><ul><li>zlib-1.2.3</li>
<li>jpeg-6b</li>
<li>libpng-1.2.24</li>
<li>freetype-2.1.10</li>
<li>mikmod-3.1.11</li>
<li>tremor-1.0.0</li>
<li>SDL-1.2.9 (paeryn)</li>
<li>SDL_image-1.2.4</li>
<li>SDL_ttf-2.0.7</li>
<li>smpeg-0.4.4</li>
<li>SDL_mixer-1.2.6</li>
<li>SDL_gfx-2.0.13</li>
<li>libxml2-2.6.24</li>
<li>expat-2.0.1</li>
</ul></div><div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"><div style="text-align: justify;">El script necesita tener en su mismo directorio, descomprida, una carpeta llamada "patches" con los parches adecuados para varias de las librerías (que se pueden descargar desde <a href="http://files.me.com/kounch/7d24jx">http://files.me.com/kounch/7d24jx</a> o desde <a href="http://www.gp32spain.com/foros/attachment.php?attachmentid=13105&d=1163931773">http://www.gp32spain.com/foros/attachment.php?attachmentid=13105&d=1163931773</a>), así como presupone que se ha instalado un entorno de desarrollo estático como el indicado en el punto anterior, en una imagen de disco montada en la ruta <i><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">/Volumes/gp2xSDKbuild</span></i>, finalmente, debe estar ajustada la variable PATH como se ha visto más arriba. Por lo tanto, debería editarse adecuadamente si se desea utilizar con otra configuración distinta.</div></div><pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"><div style="text-align: justify;">#!/bin/sh</div><div style="text-align: justify;">NAMEM=`uname -p`-apple
</div><div style="text-align: justify;">UHOST=arm-gp2xstatic-linux</div>BUILDENV=$HOST-
<div style="text-align: justify;">DENV"gcc
TARGETAR="$BUIL</div>TARGETGCC="$BUI
LDENV"ar
TARGETRANLIB="$BUILDENV"ranlib
<div style="text-align: justify;">$BASEDIR"files/
SRCDIR="$BASED</div>BASEDIR=/Volumes/gp2xSDKBuild/
FILESDIR=
"IR"src/
PATCHDIR="$SRCDIR"patches
<div style="text-align: justify;">ux/
cp -r ./patches $PATCHDIR
#"zlib</div>GP2XDEV="$BASEDIR"arm-gp2xstatic-li
n-1.2.3"
cd $FILESDIR
if test ! -f "$FILESDIR"zlib-1.2.3.tar.gz ; then
<div style="text-align: justify;">Rf zlib-1.2.3
tar xfvz "$FILESDIR"zlib-1.2.3.tar.gz
</div>curl -O http://www.gzip.org/zlib/zlib-1.2.3.tar.gz
fi
cd $SRCDIR
rm
-export CC="$TARGETGCC"
export RANLIB="$TARGETRANLIB"
export AR="$TARGETAR"
export AR="${AR} rc"
cd zlib-1.2.3
<div style="text-align: justify;">if test ! -f "$GP2XDEV"lib/l</div>./configure --prefix=$GP2XDEV
make
make install prefix=$GP2XDEV
make clean
export CC=
export RANLIB=
export AR
=ibz.a ; then
echo "Error : Fallo creando libz.a"
exit
fi
#"jpeg-6b"
cd $FILESDIR
if test ! -f "$FILESDIR"jpegsrc.v6b.tar.gz ; then
<div style="text-align: justify;">PATCHDIR/libjpeg-0.6b-GP2X.patch | patch -p1
export C</div>curl -O http://www.ijg.org/files/jpegsrc.v6b.tar.gz
fi
cd $SRCDIR
rm -Rf jpeg-6b
tar xfvz "$FILESDIR"jpegsrc.v6b.tar.gz
cd jpeg-6b
cat
$C=$TARGETGCC
export RANLIB=$TARGETRANLIB
./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable-shared --enable-static
make
make install-lib
make install-headers
make clean
<div style="text-align: justify;">24.tar.bz2</div>export CC=
export RANLIB=
if test ! -f "$GP2XDEV"lib/libjpeg.a ; then
echo "Error : Fallo creando libjpeg.a"
exit
fi
#"libpng-1.2.24"
cd $FILESDIR
if test ! -f "$FILESDIR"libpng-1.2
. ; then
curl -O ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.24.tar.bz2
fi
cd $SRCDIR
rm -Rf libpng-1.2.24
tar xfvj "$FILESDIR"libpng-1.2.24.tar.bz2
cd libpng-1.2.24
<div style="text-align: justify;">llo creando libpng.a"
exit
fi
#"freetype-2.1.10"
cd $FILESDIR
if test ! -f "$FILESDIR"f</div>./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable-shared --enable-static
make
make install
make clean
if test ! -f "$GP2XDEV"lib/libpng.a ; then
echo "Error : F
areetype-2.1.10.tar.bz2 ; then
curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.1.10.tar.bz2
fi
cd $SRCDIR
rm -Rf freetype-2.1.10
tar xfvj "$FILESDIR"freetype-2.1.10.tar.bz2
cd freetype-2.1.10
export CC="$TARGETGCC"
export CXX="$BUILDENV"g++
<div style="text-align: justify;">R=
if test ! -f "$GP2XDEV"lib</div>export RANLIB="$TARGETRANLIB"
export AR="$TARGETAR"
./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable-shared --enable-static
make
make install
make clean
export CC=
export CXX=
export RANLIB=
export
A/libfreetype.a ; then
echo "Error : Fallo creando libfreetype.a"
exit
fi
#"mikmod-3.1.11"
cd $FILESDIR
if test ! -f "$FILESDIR"libmikmod-3.1.11.tar.gz ; then
curl -O http://mikmod.raphnet.net/files/libmikmod-3.1.11.tar.gz
fi
cd $SRCDIR
rm -Rf libmikmod-3.1.11
<div style="text-align: justify;">export CC=
export CCX=
if test ! -f "$GP2X</div>tar xfvz "$FILESDIR"libmikmod-3.1.11.tar.gz
cd libmikmod-3.1.11
export CC=arm-gp2xstatic-linux-gcc
export CXX=arm-gp2xstatic-linux-g++
./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable-esd --disable-shared --enable-static
make
make install
make clea
nDEV"lib/libmikmod.a ; then
echo "Error : Fallo creando libmikmod.a"
exit
fi
#"tremor-1.0.0"
cd $SRCDIR
rm -Rf Tremor
svn checkout http://svn.xiph.org/trunk/Tremor
cd Tremor
./autogen.sh
./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable-shared --enable-static --enable-low-accuracy
make
<div style="text-align: justify;">/SDL-1.2.9-G</div>make install
make clean
if test ! -f "$GP2XDEV"lib/libvorbisidec.a ; then
echo "Error : Fallo creando libvorbisidec.a"
exit
fi
#"SDL-1.2.9 (paeryn)"
cd $FILESDIR
if test ! -f "$FILESDIR"SDL-1.2.9-GP2X-paeryn.zip ; then
curl -O http://archive.gp2x.de/cfiles/uploads/Home/gp2x%20-%20Development/Sourcecode
sP2X-paeryn.zip
fi
cd $SRCDIR
rm -Rf SDL-1.2.9-GP2X
unzip "$FILESDIR"SDL-1.2.9-GP2X-paeryn.zip
mv "$SRCDIR"SDL-1.2.9-GP2X-paeryn "$SRCDIR"SDL-1.2.9-GP2X
cd SDL-1.2.9-GP2X
chmod -R u+x *
<div style="text-align: justify;">-f "$GP2XDEV"lib/libSDL.a ; then
echo "Error : Fallo creando libSDL.a"
exit
fi
#"SDL_image-1.2.4"
cd $FILESDIR
if test ! -f "$FILESDIR"SDL_ima</div>./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --enable-pthreads --enable-pthreads-sem --disable-shared --enable-static --enable-threads
make
make install
make clean
if test !
ge-1.2.4.tar.gz ; then
curl -O http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.4.tar.gz
fi
cd $SRCDIR
rm -Rf SDL_image-1.2.4
tar xfvz "$FILESDIR"SDL_image-1.2.4.tar.gz
cd SDL_image-1.2.4
export CFLAGS=-I$GP2XDEV/include
<div style="text-align: justify;">ndo libSDL_image.a"
exit
fi
#"SDL_ttf-2.0.7"
cd $FILESDIR
if test ! -f "$FILESDIR"SDL_ttf-2.0.7.tar.gz ; then
cu</div>./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable-shared --enable-static --with-sdl-prefix=$GP2XDEV
make
make install
make clean
export CFLAGS=
if test ! -f "$GP2XDEV"lib/libSDL_image.a ; then
echo "Error : Fallo cre
arl -O http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.7.tar.gz
fi
cd $SRCDIR
rm -Rf SDL_ttf-2.0.7
tar xfvz "$FILESDIR"SDL_ttf-2.0.7.tar.gz
cd SDL_ttf-2.0.7
export CC="$TARGETGCC"
export CXX="$BUILDENV"g++
export RANLIB="$TARGETRANLIB"
export AR="$TARGETAR"
<div style="text-align: justify;">"Error : Fallo creando libSDL_ttf.a"
exit
fi
#"smpeg-0.4.4"
cd $FILESDIR
if test ! -f "$FILESDIR"smpeg-0.4.4.tar.gz ; then
#curl -O http://freshmeat.net/red</div>./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable-shared --enable-static --with-freetype-prefix=$GP2XDEV --with-sdl-prefix=$GP2XDEV --without-x
make
make install
make clean
export CC=
export CXX=
export RANLIB=
export AR=
if test ! -f "$GP2XDEV"lib/libSDL_ttf.a ; then
echo
ir/smpeg/9713/url_tgz/smpeg-0.4.4.tar.gz
#curl -O ftp://sunsite.dk/pub/os/linux/loki/open-source/smpeg/smpeg-0.4.4.tar.gz
curl -O http://mirrors.dotsrc.org/lokigames/open-source/smpeg/smpeg-0.4.4.tar.gz
fi
cd $SRCDIR
rm -Rf smpeg-0.4.4
tar xfvz "$FILESDIR"smpeg-0.4.4.tar.gz
cd smpeg-0.4.4
export CC="$TARGETGCC"
export CXX="$BUILDENV"g++
export RANLIB="$TARGETRANLIB"
export AR="$TARGETAR"
INCLUDEFLAG="$GP2XDEV"include
LDFLAG="$GP2XDEV"lib
<div style="text-align: justify;">peg.a ; then
echo "Error : F</div>export CFLAGS="-I$INCLUDEFLAG"
export LDFLAGS="-L$LDFLAG -lstdc++"
./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable-gtk-player --disable-opengl-player --disable-shared --enable-static --with-sdl-prefix=$GP2XDEV
make
make install
make clean
rm "$GP2XDEV"lib/libsmpeg.la
export CC=
export CCX=
export RANLIB=
export AR=
export CFLAGS=
export LDFLAGS=
if test ! -f "$GP2XDEV"lib/libs
mallo creando libsmpeg.a"
exit
fi
#"SDL_mixer-1.2.6"
cd $FILESDIR
if test ! -f "$FILESDIR"SDL_mixer-1.2.6.tar.gz ; then
curl -O http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.6.tar.gz
fi
cd $SRCDIR
rm -Rf SDL_mixer-1.2.6
tar xfvz "$FILESDIR"SDL_mixer-1.2.6.tar.gz
cd SDL_mixer-1.2.6
./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable-shared --enable-static --with-sdl-prefix=$GP2XDEV
make
make install
make clean
<div style="text-align: justify;">mmx --disable-shared --enable-static --with-sdl-</div>if test ! -f "$GP2XDEV"lib/libSDL_mixer.a ; then
echo "Error : Fallo creando libSDL_mixer.a"
exit
fi
#"SDL_gfx-2.0.13"
cd $FILESDIR
if test ! -f "$FILESDIR"SDL_gfx-2.0.13.tar.gz ; then
curl -O http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-2.0.13.tar.gz
fi
cd $SRCDIR
rm -Rf SDL_gfx-2.0.13
tar xfvz "$FILESDIR"SDL_gfx-2.0.13.tar.gz
cd SDL_gfx-2.0.13
export AR=$TARGETAR
./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable
-prefix=$GP2XDEV
make
make install
make clean
export AR=
if test ! -f "$GP2XDEV"lib/libSDL_gfx.a ; then
echo "Error : Fallo creando libSDL_gfx.a"
exit
fi
#"libxml2-2.6.24"
cd $FILESDIR
if test ! -f "$FILESDIR"libxml2-2.6.24.tar.gz ; then
curl -O ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.24.tar.gz
fi
cd $SRCDIR
rm -Rf libxml2-2.6.24
tar xfvz "$FILESDIR"libxml2-2.6.24.tar.gz
cd libxml2-2.6.24
cat "$PATCHDIR"/libxml2-2.6.24-GP2X.patch | patch -p1
<div style="text-align: justify;">#cat "$PATCHDIR"/SDL_svg-1.1.9-GP2X.patch | patch -p1
#INCLUDEFLAG="$GP2XDEV"include
#LDFLA</div>./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable-shared --enable-static
make
make install
make clean
if test ! -f "$GP2XDEV"lib/libxml2.a ; then
echo "Error : Fallo creando libxml2.a"
exit
fi
#"SDL_svg-1.1.9"
#cd $FILESDIR
#if test ! -f "$FILESDIR"SDL_svg-1.1.9.tar.gz ; then
# curl -O http://www.linuxmotors.com/SDL_svg/download/SDL_svg-1.1.9.tar.gz
#fi
#cd $SRCDIR
#rm -Rf SDL_svg-1.1.9
#tar xfvz "$FILESDIR"SDL_svg-1.1.9.tar.gz
#cd SDL_svg-1.1.9
G="$GP2XDEV"lib
#export CFLAGS="-I$INCLUDEFLAG -I$INCLUDEFLAG/libxml2"
<div style="text-align: justify;">t-2.0.1.tar.gz
cd expat-2.0</div>#export LDFLAGS="-L$LDFLAG"
#./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable-shared --enable-static --with-sdl-prefix=$GP2XDEV --without-x
#make
#make install
#make clean
#export CFLAGS=
#export LDFLAGS=
#if test ! -f "$GP2XDEV"lib/libSDL_svg.a ; then
# echo "Error : Fallo creando libSDL_svg.a"
# exit
#fi
#"expat-2.0.1"
cd $FILESDIR
if test ! -f "$FILESDIR"expat-2.0.1.tar.gz ; then
curl -O http://switch.dl.sourceforge.net/sourceforge/expat/expat-2.0.1.tar.gz
fi
cd $SRCDIR
rm -Rf expat-2.0.1
tar xfvz "$FILESDIR"exp
a.1
./configure --prefix=$GP2XDEV --build=$UNAMEM --host=$HOST --disable-shared --enable-static
make
make install
make clean
if test ! -f "$GP2XDEV"lib/libexpat.a ; then
echo "Error : Fallo creando libexpat.a"
exit
fi
echo "Finalizado"
<div style="text-align: justify;"></div>exit 0</pre></div>Unknownnoreply@blogger.com0