Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Win32 binaries for Allegro 5.2.2 and MinGW 5.3.0.3

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Win32 binaries for Allegro 5.2.2 and MinGW 5.3.0.3
Edgar Reynaldo
Major Reynaldo
May 2007
avatar

EDITED 05/05/2017

Hey everybody,

Just finished my build of Allegro 5.2.2 for MinGW 5.3.0.3. Sorry it took so long. There were issues with DirectX and other things that slowed me down.

Get your MinGW 5.3.0.3 here :

https://sourceforge.net/projects/unofficialmingw/files/MinGW5302v3.tar.7z/download

Get Allegro 5.2.2 here :

https://sourceforge.net/projects/unofficialallegro5distribution/files/Allegro522_MinGW5303.tar.7z/download (Bug in PhysFS, don't download)

Fixed version of 5.2.2 with PhysFS 2.0.3 patch applied :

https://sourceforge.net/projects/unofficialallegro5distribution/files/Allegro522_MinGW5303v2.tar.7z/download

And for classic Allegro users, here's the link to Allegro 4.4.3 :

https://sourceforge.net/projects/unofficialallegro5distribution/files/Allegro443_MinGW5302.tar.7z/download

There will be a new version of MinGW coming out soon with new releases for the mingwrt and win32api packages. I'll upload it as soon as it's ready. It will still be compatible with 5.3.0.3.

The binaries for Allegro 5.2.2 come with both html and chm docs, as well as all the dependent libraries allegro needs for full functionality. Included are DUMB, FLAC, enet, PhysFS, Ogg, Vorbis, Theora, Freetype2, TurboJpeg, LibPNG, and Zlib. Headers and libraries included. All of the examples are included as dynamic debugging executables. All three demos are included.

In the main directory of the distribution you'll find a .bat file that will set up your environment to run the examples, test program, and demos that come with it.

Happy trails!!! ;D

Edgar

Eric Johnson
Member #14,841
January 2013
avatar

Wow! :o Thank you for providing these, Edgar! :)

Rodolfo Lam
Member #16,045
August 2015

Thanks again for the updated CHM docs. Still the best reference format!

wqking
Member #16,641
February 2017

Thanks for the work.
Is there any binaries for Android?

I myself can build for MingW but am still stuck with Android build...

Polybios
Member #12,293
October 2010

There is a repository for Android binaries, take a look here:

https://github.com/liballeg/android

wqking
Member #16,641
February 2017

Polybios said:

There is a repository for Android binaries, take a look here:
https://github.com/liballeg/android

Thank.
It requires Android Studio, Java, and Maven?
Is there any way to use pure JNI (pure C++) to compile an Allegro rided Android application?
I've ever tried SFML Android, it doesn't require those tools, and I can just use Android.mk to build SFML itself and also my game, though it's Android support not quite good.

Polybios
Member #12,293
October 2010

Going the Android Studio way is probably easiest.

Building from the command-line is more involved. It requires ant and I'm not even 100% sure it can be done on Windows. For Linux, there is an (somewhat outdated) article on the wiki here: https://wiki.allegro.cc/index.php?title=Running_Allegro_applications_on_Android

You'll always need Java, the Android SDK plus the NDK for Android C/C++ development.

Elias
Member #358
May 2000

Google deprecated the old NDK tools, so instead of Ant and ndk-build you now use Gradle and CMake. You do not need Android Studio at all, the steps will basically be identical without it. Just when the instructions say:

Quote:

Android Studio will create these files in your new project's folder (among others):

app/src/main/java/.../MainActivity.java
app/src/main/cpp/native-lib.cpp
app/build.gradle
app/CMakeLists.txt

Create those files yourself instead :)

--
"Either help out or stop whining" - Evert

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I had someone ask me how I produced the binaries. Step by step, here is how I did it.

0. Install MinGW, CMake, the June 2010 DXSDK and Git.

0a. Build dependencies for Allegro. Most build with cmake, but some like ogg, flac, vorbis, and theora need MSYS to build.

0b. Download sal.h from liballeg.org. This is necessary for compatibility with the DXSDK, which searches for sal.h. Get it here :
http://download.gna.org/allegro/files/sal.h
(This will change soon, as gna.org is closing down).

1. Clone Allegro 5 from Git. Here is the URL :
https://github.com/liballeg/allegro5.git

2. Unpack allegro.

3. cd allegro

4. mkdir build

5. cd build

6. cmake-gui ..

7. Press configure and select Mingw native compilers.

8. Edit CMakeCache.txt and find the line that says HAVE_STRERROR_S=1. Delete the one and leave the right hand side empty. This step is for users of the mingwrt version 3 and below. This won't be necessary once mingwrt 5 is released, as strerror_r and strerror_s are included.

9. Go back to cmake-gui and configure all the dependencies, making sure all the directories are right. Options I selected are SHARED and WANT_MONOLITH as well as the Build type which is either [Debug | Release | RelWithDebInfo | Profile]. (Tip, don't build the docs in profile mode, they take forever and hang).

10. Press generate in cmake-gui once you have your options configured.

11. Go back to the command line, making sure mingw/bin is on your path and type 'mingw32-make' and 'mingw32-make install' and it should build everything. Don't worry about the warnings. Most of them are from building as C90 instead of C99.

12. Repeat steps 9 through 11 as needed for each different build configuration desired.

If you have any problems, post here and I will try to help.

Neil Roy
Member #2,229
April 2002
avatar

Nice work as always! Thanks.

I'm curious, which MinGW do you use? That is, where did you download it?

The Allegro version being reported by this Allegro is 5.2.3 by the way. ;) (deja vu... didn't we have this happen before?)

---
“I love you too.” - last words of Wanda Roy

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

It's because I built Allegro from GIT. That's why it says v5.2.3. Are you having compatibility issues again?

I download MinGW exclusively from Sourceforge and unpack each archive into a master mingw folder. Once all the components are together, I tar and 7zip them. Of course I add in GDB, grep, and diff for convenience. I use the latest available versions of each package.

Neil Roy
Member #2,229
April 2002
avatar

It's because I built Allegro from GIT. That's why it says v5.2.3. Are you having compatibility issues again?

Good memory, I forgot about that, but nope. Just to test this for you, I done clean compiles of my Deluxe Pacman 2 game (Allegro 5) and had zero issues (just the wrong version, which only shows up in my debug info). I done a clean compile on my Deluxe Pacman 1 game as well with your Allegro 4 libs you also linked to and also no issues.

All in all, seems like a successful build. Many thanks, and God bless for your efforts. :)

Quote:

I download MinGW exclusively from Sourceforge and unpack each archive into a master mingw folder. Once all the components are together, I tar and 7zip them. Of course I add in GDB, grep, and diff for convenience. I use the latest available versions of each package.

Good to know. There's a few MinGW builds out there so I was curious which you went with. Thanks.

Edit: Oh, and the compatibility issues I had the last time, I believe were my fault in the first place for mixing up versions. I am more careful about that now.

Edit2: I tried out another Allegro 5.2.2 build for MinGW 6.2.0, 32 and 64 bit versions, got compile errors galore so... sticking to Edgar's build. Just so you know. ;)

---
“I love you too.” - last words of Wanda Roy

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Neil Roy said:

Good memory, I forgot about that, but nope. Just to test this for you, I done clean compiles of my Deluxe Pacman 2 game (Allegro 5) and had zero issues (just the wrong version, which only shows up in my debug info). I done a clean compile on my Deluxe Pacman 1 game as well with your Allegro 4 libs you also linked to and also no issues.

All in all, seems like a successful build. Many thanks, and God bless for your efforts. :)

Edit2: I tried out another Allegro 5.2.2 build for MinGW 6.2.0, 32 and 64 bit versions, got compile errors galore so... sticking to Edgar's build. Just so you know. ;)

That's what they're there for. Did you try out the MSYS2 Build of MinGW-w64? Are those the binaries you're talking about?

Neil Roy
Member #2,229
April 2002
avatar

That's what they're there for. Did you try out the MSYS2 Build of MinGW-w64? Are those the binaries you're talking about?

Yeah, I tried the setup from https://www.allegro.cc/forums/thread/616753 and it didn't work.

I now have a new problem. I don't know if it is related to me trying that other build out or not but now when I run my Deluxe Pacman 2 game, after doing a clean build with your library, it compiles okay, but it won't load in any of the Truetype Fonts. I have them stored in a PAK file (ZIP) I access using physfs. I have other files in there that are loaded in okay, BMP fonts I also have. But the TTF give errors.

I tried hiding the folder that I normally put Allegro into (a separate folder than my MinGW install). I put ONLY your build files into the MinGW32 directory directly (normally I don't do that, so nothing else is in there, it's the same MinGW32 you provided as well) but still a no go. So... perhaps this was a problem that was already in your build that i somehow missed?

The thing is, I haven't been programming my game AT ALL... so I haven't changed anything. I even went over the link order of the libraries and made certain they are in the order you listed (note: physfs was not listed in the libs you mentioned, nor was dsound, though they were needed to compile).

I haven't tried reverting back to an older build of yours yet, but I may soon if there is nothing else I can do.

EDIT: I just recompiled using your Allegro 5.2.1 build you released before this and it compiled and ran fine. This one compiles fine, but won't load TTF. BMP fonts loaded and displayed fine.

---
“I love you too.” - last words of Wanda Roy

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Can you load a TTF file fine outside of your game or outside of your pack file? Try ex_ttf and ex_font and see what they do for you. Run the batch file inside of the main allegro 5.2.X folder and then run both of those example programs and tell me if they work for you. Have you copied the dlls properly into the packman executable?

Neil Roy
Member #2,229
April 2002
avatar

The game works perfectly with Allegro 5.2.1. And my game is statically linked. It isn't physfs or the BMP fonts would not load either, but they do. And if it was my setup, Allegro 5.2.1 wouldn't work either.

---
“I love you too.” - last words of Wanda Roy

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I looked at the change logs for 5.2.X and I didn't see much to do with the ttf addon except for some pre-rendering caching routines for Android.

Like I said, does ex_ttf or ex_font or ex_physfs work for you? I provided them with the examples. Just run that batch script and then run the examples from the command line.

Neil Roy
Member #2,229
April 2002
avatar

Like I said, does ex_ttf or ex_font or ex_physfs work for you? I provided them with the examples. Just run that batch script and then run the examples from the command line.

Sorry, I just tested them all. All work except ex_physfs. It doesn't work. I tested the same ones with your older 5.2.1 build and they all work (including physfs) with it. So the problem appears to be with physfs. Which still seems strange as my bitmap font loads with physfs but not the ttf. That should help narrow the problem down anyhow.

It kind of bugs me that there is no error message when ex_physfs fails at all.

---
“I love you too.” - last words of Wanda Roy

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I used PhysFS 2.0.3 in my build. Can you provide a debugging build of your program? Link to the static debugging monolith instead? Either it's failing to load the ttf, or it's failing to find the ttf inside the zip.

Can you do a short example program that fails? Like with a test font inside a pack file you open with physfs? That way I could test it on my own computer.

Neil Roy
Member #2,229
April 2002
avatar

I always build my debug version with the debug version of the library. But I compile using what you provided.

Actually, I just realized I can attach the allegro.log here for you to examine. I just deleted it, then recompiled and reran it so this log is fresh.

I'll attach it to this.

I noticed the following line in that log...

font E C:\LIBS5303Build\allegro5\addons\ttf\ttf.c:891 al_load_ttf_font_stretch_f [ 3.17001] Reading Fonts/Verdana_Bold.ttf failed. Freetype error code 85

edit: I noticed someone else had a similar problem years ago, but they had no response to their post and I don't know if they ever got it resolved.

https://www.allegro.cc/forums/thread/614261

---
“I love you too.” - last words of Wanda Roy

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

That comes up as :

FT_ERRORDEF_( Divide_By_Zero, 0x85,
"division by zero" )

Can you try replacing it with your system font for VerdanaBold? Where did you get it from? Can you try loading your Verdana_Bold outside of physfs? Can you upload your font here so I can play with it?

Can you replace your old copy in the zip file with a fresh copy of the font? Wherever you got it from???

Neil Roy
Member #2,229
April 2002
avatar

Can you try replacing it with your system font for VerdanaBold? Where did you get it from? Can you try loading your Verdana_Bold outside of physfs? Can you upload your font here so I can play with it?

Can you replace your old copy in the zip file with a fresh copy of the font? Wherever you got it from???

1) Replaced verdana bold with a new copy of it from the same source, even changed the filename. Same problem.
2) Tried loading the font from outside the ZIP file, from a normal folder and it loaded no problem. The very next font that tried to load from the ZIP file failed, a totally different font. Also note that I successfully loaded a BMP font from the same ZIP file without problems.
3) It's not just THIS font, it's ANY TTF. I tried a totally different TTF. They load fine from a normal folder, they do not load from the ZIP. Yet Allegro 5.2.1 loads them just fine from all locations. I ONLY compile with the libraries YOU supplied each time, with the same compiler you supplied. The program is compiled with the exact same settings each time, both with Allegro 5.2.1 and with the version in this forum. Yet I have zero problems with 5.2.1, so something changed between versions.

Also, note my previous message where someone had the exact same problem with the exact same divide by zero error back in 2014 (I linked the message) so this is nothing new I guess.

a) Which version of Freetype did you use for Allegro 5.2.1? Was it the same version this time, compiled the same way?
b) Which version of Physfs did you use with 5.2.1? Was it the same version this time?

---
“I love you too.” - last words of Wanda Roy

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Neil Roy
Member #2,229
April 2002
avatar

You say it won't load from a zip file. Have you set the correct interface? There are two.

Here's a snippet of code;

#SelectExpand
1 // This loads a bitmap version of the font from the zip file using physfs, it works with no problems. 2 font_verdana_bmp = al_load_bitmap_font("Fonts/Verdana_Bold_12_A4.png"); 3 if(!font_verdana_bmp) { 4 a5_error(AT, setting.screen, "Error loading Verdana_Bold_12_A4.png"); 5 shut_down(); 6 exit(1); 7 } 8 9 // Here I disabled the physfs file interface and loaded from a folder without problems 10 al_set_standard_file_interface(); 11 font_verdana = al_load_ttf_font("pak/Fonts/verdanab.ttf", 18, 0); 12 if(!font_verdana) { 13 a5_error(AT - 2, setting.screen, "Error loading Verdana_Bold.ttf."); 14 shut_down(); 15 exit(1); 16 } 17 al_set_physfs_file_interface(); 18 19 // I re-enabled the physfs interface to load this TTF from the zip, and it failed. 20 font_amaze = al_load_ttf_font("Fonts/Amaze_Bold.ttf", 60, 0); 21 if(!font_amaze) { 22 a5_error(AT, setting.screen, "Error loading Amaze_Bold.ttf."); 23 shut_down(); 24 exit(1); 25 }

I added in comments. Everything else I load from the ZIP file loads just fine. I load in a special bitmap font from the ZIP file without problems, it's what you see when you see "Loading..." when you run the game, it displays no problem. ONLY the TTFs will not load from the ZIP.

Oh, and those are mainly just fonts I think I grabbed from the Windows/fonts folder. I have since been using GNU Free fonts for newer projects (http://ftp.gnu.org/gnu/freefont/).

And obviously I got the interface right or how would it have worked fine with Allegro 5.2.1?! Seriously, this is NOT on my end. Nothing changed other than me recompiling with the newest version, and I recompiled with the compiler you supplied and the libraries you supplied only. Otherwise, there was no change. As I said, it worked before. And the example physfs program doesn't work and I didn't have anything to do with compiling that. That alone should prove it is not on my end.

I'm not concerned anyhow. I'll stick with using 5.2.1.

---
“I love you too.” - last words of Wanda Roy

bamccaig
Member #7,536
July 2006
avatar

Off-topic: whose smart idea was ".tar.7z"? 7z archives can contain directories. No need for a tarball. :P Worse yet, the 7z utilities aren't smart enough to extract a tarball automatically so you have to extract them twice. It looks like MinGW is doing this, which is probably dumb, but maybe there's a good reason for it. Otherwise, there's no reason at least you could skip the tarball and spare the user some senseless fuss. :)

 1   2 


Go to: