The Allegro Wiki is migrating to github at https://github.com/liballeg/allegro_wiki/wiki
Building Allegro 4.9/Installing 4.9 Windows
To build Allegro 5 and all its add-on libs, you'll need to install the following libs for your compilers. Open a console and make sure the MING_DIR and MSCVDir environment variables are set
zlib and libpng (optional)
zlib is required if want PNG and/or TTF support
copy zlib1.dll \windows\system32
copy lib\zdll.exp %MSVCDir%\lib copy lib\zdll.lib %MSVCDir%\lib copy include\*.h %MSVCDir%\include
copy lib/zdll.lib %MING_DIR%\lib ren %MING_DIR%\lib\zdll.lib libz.a copy include/*.h %MING_DIR%\include
mingw & msvc
Gnuwin32 have good precompiled binaries of libpng 1.2
Download http://heanet.dl.sourceforge.net/sourceforge/gnuwin32/libpng-1.2.7-bin.zip This contains bin/libpng.dll which you copy to \windows\system32
Download http://heanet.dl.sourceforge.net/sourceforge/gnuwin32/libpng-1.2.7-lib.zip which contains both mingw and vc libs
copy include\* %MSVCDir%\include copy include\* %MING_DIR%\include copy lib\lib* %MING_DIR%\lib copy lib\pkgconfig\libpng.lib %MSVCDir%\lib
freetype provides support for the al_ttf & al_font add-ons. Requires zlib.
Gnuwin32 Website : http://gnuwin32.sourceforge.net/packages/freetype.htm
Download : http://heanet.dl.sourceforge.net/sourceforge/gnuwin32/freetype-2.3.5-1-setup.exe and run it. Is this supposed to install in the compiler automatically? well it didn't for me. So, in C:\Program Files\GunWin32
copy bin\freetype6.dll to \WINDOWS\System32
copy -r include\* %MSVCDir%\include ft2build.h and freetype dir copy lib\freetype.lib %MSVCDir%\include
copy -r include\* %MING_DIR%\include ft2build.h and freetype dir copy lib\libfreetype.dll.a %MING_DIR%\lib copy lib\libfreetype6.def %MING_DIR%\lib
If you build Allegro without this, you will not get the d3d9 graphics driver. You cannot build the DLL without this, as the ABI specifies its presence.
M$ DX SDK Download page:
- http://www.microsoft.com/downloads/details.aspx?FamilyID=77960733-06e9-47ba-914a-844575031b81&DisplayLang=en - 150MB - needs WGA - 9.0c
- http://www.microsoft.com/downloads/details.aspx?familyid=519AAE99-B701-4CA1-8495-39DDDE9D7030&displaylang=en - enormous 450MB but no WGA and includes DX10
Web page: http://www.cmake.org/ Download page: http://www.cmake.org/cmake/resources/software.html
Open a console. Use either the Start-menu VS shortcut or manually run VCVAR32.BAT In your allegro dir, type
to see the list of generators which should include your version of Visual Studio, and then (e.g.)
cmake -G "Visual Studio 8 2005" -DSTATIC=ON -DSHARED=OFF
use -DSHARED=OFF if you do not have both Open GL and D3D9 libs installed, because they are both needed to build the DLL.
Now you should have 2 workspace/solution files in the root e.g. ALLEGRO.sln and BUILDALL.sln Open your dir in Explorer and open ALLEGRO.sln. This will start VS with all the Allegro libs and examples as projects. Build All. Enjoy the examples.
Now quit and install allegro+plugins for other projects
copy lib\debug\*.lib %MSVCDir%\lib\ mkdir %MSVCDir%\include\allegro5 xcopy include\allegro5\* %MSVCDir%\include\allegro5 /E
Now, write a game