<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ca">
	<id>http://wiki.joanillo.org/index.php?action=history&amp;feed=atom&amp;title=Videojocs_amb_Allegro</id>
	<title>Videojocs amb Allegro - Historial de revisió</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.joanillo.org/index.php?action=history&amp;feed=atom&amp;title=Videojocs_amb_Allegro"/>
	<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=Videojocs_amb_Allegro&amp;action=history"/>
	<updated>2026-09-12T11:18:52Z</updated>
	<subtitle>Historial de revisió per a aquesta pàgina del wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=Videojocs_amb_Allegro&amp;diff=34752&amp;oldid=prev</id>
		<title>Joan: /* Instal.lació SVN (v4.9) */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=Videojocs_amb_Allegro&amp;diff=34752&amp;oldid=prev"/>
		<updated>2010-11-16T13:07:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Instal.lació SVN (v4.9)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pàgina nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Referències i tutorial=&lt;br /&gt;
*http://alleg.sourceforge.net/&lt;br /&gt;
*http://www.allegro.cc&lt;br /&gt;
*http://wiki.allegro.cc&lt;br /&gt;
&lt;br /&gt;
Tutorial:&lt;br /&gt;
*[[Imatge:Curso de Programacion videojuegos C++ Allegro3.pdf]]&lt;br /&gt;
=Instal.lació synaptic (v4.2)=&lt;br /&gt;
instal.lo liballegro4.2, liballegro4.2-dev, els exemples, i liballegro4.2-plugin-jack (JACK audio plugin)&lt;br /&gt;
&lt;br /&gt;
els exemples del paquet allegro-examples estan a /usr/bin/allegro-examples&lt;br /&gt;
&lt;br /&gt;
==Integració amb JACK (TBD)==&lt;br /&gt;
Mirant el synaptic he vist el paquet:&lt;br /&gt;
liballegro4.2-plugin-jack: JACK audio plugin for the Allegro library&lt;br /&gt;
&lt;br /&gt;
=Instal.lació SVN (v4.9)=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir /usr/share/allegro&lt;br /&gt;
$ cd /usr/share/allegro&lt;br /&gt;
$ svn co https://alleg.svn.sourceforge.net/svnroot/alleg/allegro/branches/4.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
README_make.txt discusses compilation with GNU make.  This applies to Unix-like operating systems such as Linux, MacOS X and MinGW on Windows.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Linux users likely have all the dependencies already, except PhysicsFS&lt;br /&gt;
and DUMB. If your distribution uses separate development packages, they&lt;br /&gt;
will need to be installed.  The packages are probably named *-dev or *-devel.&lt;br /&gt;
&lt;br /&gt;
These are the dependencies required for the addons:&lt;br /&gt;
&lt;br /&gt;
- libpng and zlib, for PNG image support (Unix and older MinGW only)&lt;br /&gt;
  Home page: &amp;lt;http://www.libpng.org/pub/png/&amp;gt;&lt;br /&gt;
  Windows binaries: &amp;lt;http://gnuwin32.sourceforge.net/packages/libpng.htm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- libjpeg, for JPEG image support (Unix and older MinGW only)&lt;br /&gt;
  Home page: &amp;lt;http://www.ijg.org/&amp;gt;&lt;br /&gt;
  Windows binaries: &amp;lt;http://gnuwin32.sourceforge.net/packages/jpeg.htm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- FreeType, for TrueType font support.&lt;br /&gt;
  Home page: &amp;lt;http://freetype.sourceforge.net/&amp;gt;&lt;br /&gt;
  Window binaries: &amp;lt;http://gnuwin32.sourceforge.net/packages/freetype.htm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Ogg Vorbis, a free lossy audio format. (libogg, libvorbis, libvorbisfile)&lt;br /&gt;
  Home page: &amp;lt;http://www.vorbis.com/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- FLAC, a free lossless audio codec. (libFLAC, libogg)&lt;br /&gt;
  Home page: &amp;lt;http://flac.sourceforge.net/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- DUMB, an IT, XM, S3M and MOD player library. (libdumb)&lt;br /&gt;
  Home page: &amp;lt;http://dumb.sourceforge.net/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- OpenAL, a 3D audio API.&lt;br /&gt;
  The audio addon can use OpenAL, although the 3D capabilities aren't used.&lt;br /&gt;
  &amp;lt;http://kcat.strangesoft.net/openal.html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Anem a instal.lar-ho:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /usr/share/allegro (és on he descomprimit l'Allegro)&lt;br /&gt;
$ sudo mkdir Build (és on s'instal.larà)&lt;br /&gt;
$ cd Build&lt;br /&gt;
$ sudo cmake ..&lt;br /&gt;
&lt;br /&gt;
-- The C compiler identification is GNU&lt;br /&gt;
-- The CXX compiler identification is GNU&lt;br /&gt;
...&lt;br /&gt;
-- Looking for sys/types.h&lt;br /&gt;
...&lt;br /&gt;
-- Looking for getexecname&lt;br /&gt;
...&lt;br /&gt;
-- Performing Test ALLEGRO_HAVE_PROCFS_ARGCV&lt;br /&gt;
-- Performing Test ALLEGRO_HAVE_PROCFS_ARGCV - Failed&lt;br /&gt;
-- Performing Test ALLEGRO_HAVE_SV_PROCFS_H&lt;br /&gt;
-- Performing Test ALLEGRO_HAVE_SV_PROCFS_H - Failed&lt;br /&gt;
-- Performing Test ALLEGRO_HAVE_VA_COPY&lt;br /&gt;
-- Performing Test ALLEGRO_HAVE_VA_COPY - Success&lt;br /&gt;
...&lt;br /&gt;
-- checking for module 'alsa'&lt;br /&gt;
--   found alsa, version 1.0.23&lt;br /&gt;
-- Could NOT find FLAC  (missing:  FLAC_INCLUDE_DIR OGG_LIBRARY FLAC_LIBRARY)&lt;br /&gt;
WARNING: libFLAC not found, disabling support.&lt;br /&gt;
-- Could NOT find DUMB  (missing:  DUMB_INCLUDE_DIR DUMB_LIBRARY)&lt;br /&gt;
WARNING: libdumb not found, disabling support. &amp;lt;http://dumb.sourceforge.net/&amp;gt;&lt;br /&gt;
-- Could NOT find VORBIS  (missing:  OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)&lt;br /&gt;
WARNING: libvorbis not found, disabling support.&lt;br /&gt;
-- Found Freetype: /usr/lib/libfreetype.so&lt;br /&gt;
-- Could NOT find PHYSFS  (missing:  PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)&lt;br /&gt;
-- checking for module 'gtk+-2.0'&lt;br /&gt;
--   found gtk+-2.0, version 2.20.1&lt;br /&gt;
-- checking for module 'gthread-2.0'&lt;br /&gt;
--   found gthread-2.0, version 2.24.2&lt;br /&gt;
-- Not building ex_physfs&lt;br /&gt;
-- Configuring done&lt;br /&gt;
-- Generating done&lt;br /&gt;
-- Build files have been written to: /usr/share/allegro/Build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
es genera el Build, i es veu les llibreries que tinc i les que no tinc. S'ha generat el Makefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo make&lt;br /&gt;
$ sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
S'instal.la bé i ja puc veure algunes demos&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ /usr/share/allegro/Build/demos/speed&lt;br /&gt;
$ ./speed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
i els exemples de codi (els binaris) i els codis font corresponents estan a:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /usr/share/allegro/Build/example (binaris)&lt;br /&gt;
$ cd /usr/share/allegro/examples (codis font)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ja puc compilar el projecte més senzill:&lt;br /&gt;
&lt;br /&gt;
'''main.cpp''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;allegro.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    allegro_init();&lt;br /&gt;
    install_keyboard();&lt;br /&gt;
    set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0);&lt;br /&gt;
    textout_centre_ex(screen, font, &amp;quot;Hello, World!&amp;quot;, 160, 100, makecol(255, 255, 255), -1);&lt;br /&gt;
    readkey();&lt;br /&gt;
    return 0;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ main.cpp -o main `allegro-config --static`&lt;br /&gt;
&lt;br /&gt;
The program 'allegro-config' is currently not installed.  You can install it by typing:&lt;br /&gt;
$ sudo apt-get install liballegro4.2-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
però clar, de fet t'instal.la allegro4.2 quan de fet jo tinc instal.lat ara la versió 4.9&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++ main.cpp -o main `allegro-config --static`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
i ara ja compila i s'executa el codi més simple.&lt;br /&gt;
&lt;br /&gt;
Les llibreries estan a '''/usr/local/include/allegro5/'''. Per exemple, anem a compilar l'exemple ex_blit.c&lt;br /&gt;
&lt;br /&gt;
No compila, però no és un problema de què no trobi la ruta /usr/local/include/allegro5/&lt;/div&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
</feed>