Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Distros for MinGW 4.8.1/5.3.0 and Allegro 4.4.3/5.2.1.1 ready for download

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Distros for MinGW 4.8.1/5.3.0 and Allegro 4.4.3/5.2.1.1 ready for download
Edgar Reynaldo
Major Reynaldo
May 2007
avatar

EDIT 10/29/2016
I've updated MinGW 5.3.0-2 to use mingwrt 3.22.4 to fix several issues when compiling with the C++ 11 standard. Please update your compiler.

EDIT 10/08/2016
I've updated MinGW 5.3.0-2 to use mingwrt 3.22 and the win32api 3.18. This fixes several issues when compiling with the C++11 standard.

EDIT 09/21/2016
Fixed a couple issues with the static binaries for Allegro 5.2.1.1. They were linked dynamically to the CRT instead of statically. That is fixed in release 3. The full list of static link libraries is now included with the distro, as well as the D3D dlls. In addition, I will be uploading a new version of MinGW 5.3.0-2 soon with updated MinGW Runtimes and Win32 APIs as soon as their release is finalized. This will fix issues MinGW 5.3.0-2 has with compiling with the C++11 standard (-std=c++11).

EDIT 09/03/2016
There are a few updates for the binaries. The first release of Allegro 5.2.1.1 had a few timing issues, which are fixed in the latest release in this thread. It also lacked the static FLAC libraries, which are built and included now. As well, the first distribution of MinGW 5.3.0-2 had a bug in mingw/include/math.h where _hypot was incorrectly referenced, so if you included cmath or math.h when using the C++11 standard, programs no longer compiled. See README_MinGW.txt for details. This will be fixed in an upcoming release. This post has been updated to reflect the new versions of the Allegro binaries and downloads. Please update if necessary. Thanks.

Original Post
Hi everybody.

I've put together some unofficial distributions of MinGW 4.8.1 and MinGW 5.3.0, as well as binaries of Allegro 4.4.3 from GIT as of 8/12/2016 and Allegro 5.2.1.1 for each version of MinGW. Each includes all the example and test programs as well as the addons and dependencies. Only monolith versions of Allegro 5 are provided.

Hopefully this helps get some more people developing with allegro. Development is as easy as using 7-zip to unpack each archive twice and then setting your system path for mingw and your search paths for allegro.

Any questions, ask away. ;)

Get MinGW here

Unofficial distribution of MinGW gcc 4.8.1-4

Unofficial distribution of MinGW GCC 5.3.0-2 v3

Get your classic Allegro 4.4 here

Unofficial distribution of Allegro 4.4.3 for MinGW gcc 4.8.1-4

Unofficial distribution of Allegro 4.4.3 for MinGW gcc 5.3.0-2

And get the modern day Allegro 5.2 here

Allegro5211_MinGW4814_Rel3.tar.7z

Allegro5211_MinGW5302_Rel3.tar.7z

Each Allegro binary comes with a .bat file in the root directory of the archive. If you run it, it sets up a cmd.exe environment ready to run the included examples and test programs. Note, I put the dlls in their own directory to prevent duplication of files, so if you want to run them from without the .bat environment you need to copy the dlls to the appropriate folder. Every program is built as dynamic debug, so you can help debug allegro if something goes wrong on your system.

Please test them out and let me know if everything works as expected. (Examples run, programs using the libs build and run correctly, all headers are included, etc...).

Additionally, included are chm docs for each version of Allegro. I find them much easier to use. I will include them for download separately here in case you just want a nice copy of the manuals :

Allegro 443 CHM Manual

Allegro 5211 CHM Manual

The scripts I used to build chm docs for Allegro 5 were provided by ArekXV :

ArekXV said:

I've made a batch script which automatically generates necessary files and compiles CHM file.

All you need to do is to put the contents into docs/html of allegro source run generateCHM.bat and press Enter to begin.

Get it here:
https://www.dropbox.com/s/93queu1a4nvv4wc/generateCHM.7z

Please note that HTML Help Workshop needs to be installed for this to work. This script will look for it in Program Files directory.

I've uploaded a copy since dropbox doesn't work for me. (Anybody else have the same problem?)

generateCHM.7z

Neil Roy
Member #2,229
April 2002
avatar

Thanks for these... and yes, I will check my paths carefully! ;)

I'm really interested in putting MinGW 5.3.0 on. The only reason I ever use 4.8.1 is for Allegro. So, nice to be able to upgrade that.

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

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Neil Roy
Member #2,229
April 2002
avatar

I managed to recompile just fine using MinGW 5.3.0-2, and the new Allegro 5. When I ran my game (Deluxe Pacman 2), when it loads a level and waits for a keypress to begin play, the pacman character jumps ahead quite far, then resumes normal play. If I wait long enough, the ghosts will suddenly appear next to you and you die right away.

This appears to have something to do with the timer interrupts. I use three of them. One for redrawing, and two for timing the ghosts and the player.

I didn't reprogram anything, I just recompiled using the new files you supplied.

Here's some code I use where my game waits for a keypress...

         //Stop the timers while we wait for a keypress
         al_stop_timer(pacman.timer);
         al_stop_timer(ghost[0].timer);
         al_stop_timer(setting.redraw_timer);

         // wait for keypress and if it returns true (ESC pressed), exit game loop.
         bool break_loop = false;
         if(wait_for_keypress(0)) break_loop = true;

         //Restart timers
         al_start_timer(setting.redraw_timer);
         al_start_timer(ghost[0].timer);
         al_start_timer(pacman.timer);

So as you can see, this should stop the timers, but I suspect it is not.

This worked for the previous versions. (Edit: that is, it worked with 5.2.0, which was the last I compiled it with, I missed 5.2.1)

EDIT: I ran "ex_timer" and it runs fine. But when I run "ex_timer_pause" from the command prompt, it returns to the prompt right away without anything.

Edit 2: I just noticed that 5.2.1 changed something with the timers, so I assume this is when the problem was introduced? I didn't use 5.2.1 at all, I haven't been on here in a while.

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

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I can confirm the behavior with ex_timer_pause. It exits immediately. If I run it through gdb, it pauses normally. BUT, in neither case do any of the printf statements get output. stdout seems to have been redirected, or else there is something else going on.

It does the same thing for Allegro 5.2.1.1 whether it was compiled with MinGW 4.8.1 or 5.3.0.

You should report this in the Allegro 5.2.1.1 release thread.

EDIT

Neil, I discussed this on the [AD] mailing list and Trent provided a patch he thinks will fix this. Can you download this patched dll and try it with your Pacman game? It needs to be linked to the debugging allegro monolith library I provided for MinGW 5.3.0-2.

EDIT2 (There's a newer version below)
allegro_monolith-debug-5.2.dll

Put it in the same directory as your executable so it is the first one loaded (in case you are running the path script I provided).

Rodolfo Lam
Member #16,045
August 2015

Edgar, thank a lot for the CHM for latest 5.2.1.1, while I like the manual provided on the main site, *.chm files have always being my favorite way to read documentation as well.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

@Rodolfo
You're welcome. ;) It's so nice to have the fixed navigation bar on the left so you can jump between topics with ease. That's why I like CHM so much.

I would prefer it though, if the A5.2 manual was like the A4.4 manual, where the sub topics were included in books on the left. I'm not sure how to achieve that with the current system.

EDIT
@Neil
Trent gave me a second patch. Here is the dll after the second patch (try this one, and ignore the first) :

allegro_monolith-debug-5.2.dll

EDIT2
Neil, where'd ya go???

If anybody else has a game where they start and stop the timers, I'd appreciate it if you could test out the MinGW 5.3.0 Allegro 5.2.1.1 distro with the attached debug dll.

Neil Roy
Member #2,229
April 2002
avatar

Sorry, haven't been on in a while. I don't use DLLs, I statically link.

Maybe I'll try recompiling with DLLs just to test.

Edit: Sorry, my project it set up for static link compile. When I try compiling for a DLL I get errors.

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

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Okay, here is a patched static debug lib for you to link against. Try linking against this and see if your error timing problem goes away.

liballegro_monolith-debug-static.a

EDIT
Scratch that, use this one instead - the one above has a dependency on the FLAC dll. I didn't notice there was no static FLAC library, and I had to fiddle with it a little bit. What I said makes no sense. A static library has no dependencies. The static FLAC lib is missing from my distribution though, and I'll repackage that tomorrow.

liballegro_monolith-debug-static.a

Neil Roy
Member #2,229
April 2002
avatar

Okay, that one fixed the problem, thanks. Just need a non-debug version. ;)

Maybe I'll get energetic tomorrow and see if I can compile for DLL tomorrow and let you know how that goes.

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

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Neil Roy
Member #2,229
April 2002
avatar

Perfect. I'll let Trent know the fix is good, and I'll recompile everything tomorrow and make a new release.

Thanks a lot for your (and Trent's) work. It's appreciated.

I'll try and check back here more often in the future. ;)

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

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Neil Roy
Member #2,229
April 2002
avatar

Thanks a lot for that. I recompiled the game with this version of Allegro and MinGW 5.3.0. It's available for download at the link in my signature.

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

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Neil Roy
Member #2,229
April 2002
avatar

I use Inno Setup, is free software (source is available as well) from http://www.jrsoftware.org/isdl.php

It's simple to use I think.

As for my levels, the game comes with a level editor. It loads the levels in order from the "pak" file (which is just a ZIP file renamed, you can open it as a zip if you like). The game scans for custom levels at start up (there can also be custom images which are displayed before each level, which was something someone requested).
Each level can use whatever background you wish, that is set in the level editor actually. It's just a single tile you change with the mouse wheel (it's all in the manual which nobody reads, ;D). You draw the lines in the levels, just select a line set, click and drag to draw. I tried to make it as simple as possible to use. The Validate command checks the level for any errors. When a person validates the level, the editor stores a flag showing it was checked, otherwise the level will not load.

The inno setup file for my Deluxe Pacman 2 game is the following, if you want an idea how to do it...

; -- Deluxe Pacman 2.iss --
;   A simple script for now, I will expand on it later.

[Setup]
UsePreviousAppDir=no
;changed the next two from yes to no
DisableStartupPrompt=no
DisableDirPage=no
AppName=Deluxe Pacman 2
AppVerName=Deluxe Pacman 2 version v16.09.03 (1745)
AppVersion=v16.09.03 (1745)
OutputBaseFilename=Deluxe_Pacman_2_setup
OutputDir=Setup
DefaultDirName={%userprofile}\Deluxe Pacman 2
DefaultGroupName=Deluxe Pacman 2
SetupIconFile=Deluxe_Pacman_2.ico

[Files]
Source: "bin\Deluxe Pacman 2.exe"; DestDir: "{app}"
Source: "bin\Pace 2.exe"; DestDir: "{app}"
Source: "bin\Deluxe Pacman 2.pak"; DestDir: "{app}"
Source: "bin\Line Example.png"; DestDir: "{app}"
Source: "docs\Deluxe Pacman 2 - License.txt"; DestDir: "{app}\docs"; Flags: isreadme
Source: "docs\Deluxe Pacman 2 - Manual (Read this!).txt"; DestDir: "{app}\docs"
Source: "docs\Deluxe Pacman 2 - Journal.txt"; DestDir: "{app}\docs"
Source: "docs\Deluxe Pacman 2 - Cheat Keys.txt"; DestDir: "{app}\docs"

[Icons]
Name: "{group}\Deluxe Pacman 2"; Filename: "{app}\Deluxe Pacman 2.exe"; WorkingDir: "{app}"
Name: "{group}\Level Editor"; Filename: "{app}\Pace 2.exe"; WorkingDir: "{app}"
Name: "{group}\Uninstall"; Filename: "{uninstallexe}"
Name: "{group}\Documentation\Manual"; Filename: "{app}\docs\Deluxe Pacman 2 - Manual (Read this!).txt"
Name: "{group}\Documentation\Journal"; Filename: "{app}\docs\Deluxe Pacman 2 - Journal.txt"
Name: "{group}\Documentation\Licence"; Filename: "{app}\docs\Deluxe Pacman 2 - License.txt"
Name: "{group}\Deluxe Pacman 2 website"; Filename: "http://home.cogeco.ca/~nroy15/games_index.html"
Name: "{userdesktop}\Deluxe Pacman 2"; Filename: "{app}\Deluxe Pacman 2.exe"; WorkingDir: "{app}"

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

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

A. van Patmos
Member #15,349
October 2013

With a new Windows install on my laptop I thought I'd use new versions of the software too. (I was still using 5.0.10 and MinGW 4.7.1-tdm )
Now I have CB13 (zip without compiler) and I followed the wiki page for installation again, except there is no bundle of "static-mt" files this time.
This is the linker portion of my cbp file:

<Linker>
	<Add option="-s" />
	<Add option="-static-libgcc" />
	<Add library="C:\Allegro5211_MinGW5302_Rel2\lib\liballegro_monolith-static.a" />
	<Add library="C:\MinGW5302\lib\libgdiplus.a" />
	<Add library="C:\MinGW5302\lib\libuuid.a" />
	<Add library="C:\MinGW5302\lib\libkernel32.a" />
	<Add library="C:\MinGW5302\lib\libwinmm.a" />
	<Add library="C:\MinGW5302\lib\libpsapi.a" />
	<Add library="C:\MinGW5302\lib\libopengl32.a" />
	<Add library="C:\MinGW5302\lib\libglu32.a" />
	<Add library="C:\MinGW5302\lib\libuser32.a" />
	<Add library="C:\MinGW5302\lib\libcomdlg32.a" />
	<Add library="C:\MinGW5302\lib\libgdi32.a" />
	<Add library="C:\MinGW5302\lib\libshell32.a" />
	<Add library="C:\MinGW5302\lib\libole32.a" />
	<Add library="C:\MinGW5302\lib\libadvapi32.a" />
	<Add library="C:\MinGW5302\lib\libws2_32.a" />
	<Add library="C:\MinGW5302\lib\libshlwapi.a" />
</Linker>

Am I doing this right? Should the compiled program ask for libstdc++-6.dll and libgcc_s_dw2-1.dll? When I put those in the same dir it runs OK.
Or should I link a different Allegro library?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

If you're linking liballegro_monolith-static.a and it is asking you for libstdc++-6.dll and libgcc_s_dw2-1.dll then I built it wrong. I just need to go back and add -static to the compile options in cmake.

Gimme a little bit and I'll re-build and re-upload. Thanks for pointing that out.

Here are the new versions of the static allegro monolithic libraries for each compiler :

Allegro5211_MinGW4814_Rel3_StaticLibs.7z

Allegro5211_MinGW5302_Rel3_StaticLibs.7z

I'll update the distros a little later when I have time to upload them.

Note - GCC 4.8 and 5.3 both link to the c and c++ standard libraries dynamically, so you have to use "-static -static-libstdc++ -static-libgcc" in your compile line to static link those libs against your exe, otherwise you'll need to include those dlls with your program.

A. van Patmos
Member #15,349
October 2013

OK, thanks. Two questions, has the resulting exe grown so much because I link the monolith version?
And how did

<Add option="-s" />

get into the cbp file and what does it do?
(I mean I also have

<Add option="-DALLEGRO_STATICLINK" />

there but I know how I got it)

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

A static version will have a larger executable, but you end up saving space in the long run by not having to distribute dlls containing every function (used or not).

-s strips the executable of all symbols, resulting in a smaller file. Don't do this if you want to debug and you are using -g otherwise your debugging information will be stripped.

Neil Roy
Member #2,229
April 2002
avatar

Here's the complete CodeBlocks project file I have for my Deluxe Pacman 2, compiled with Edgar's Allegro 5 setup and CodeBlocks 16.01 (the latest). It may help you with yours (it should work with CodeBlocks 13, I was using it with 13 up until recently).

This is my complete project file with debug and release version setup in it.
note: I compile with C11 code. Not C++. Otherwise, this works well for me. I have CodeBlocks in "C:\develop\CodeBlocks", I have MinGW by itself in "C:\MinGW" and I have separate libraries I add on (like Allegro) in "C:\MinGW_Dev_Lib\". This way I can easily update MinGW without effecting my add on libraries.

#SelectExpand
1<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 2<CodeBlocks_project_file> 3 <FileVersion major="1" minor="6" /> 4 <Project> 5 <Option title="Deluxe Pacman 2" /> 6 <Option platforms="Windows;" /> 7 <Option pch_mode="2" /> 8 <Option compiler="gcc" /> 9 <Build> 10 <Target title="Debug"> 11 <Option platforms="Windows;" /> 12 <Option output="bin/Deluxe Pacman 2 dbg" prefix_auto="1" extension_auto="1" /> 13 <Option working_dir="bin" /> 14 <Option object_output="obj/Debug/" /> 15 <Option type="1" /> 16 <Option compiler="gcc" /> 17 <Option projectLinkerOptionsRelation="2" /> 18 <Compiler> 19 <Add option="-Wall" /> 20 <Add option="-pg" /> 21 <Add option="-g" /> 22 <Add option="-Wno-unused" /> 23 <Add option="-DDEBUG" /> 24 <Add directory="../../../MinGW_Dev_Lib/include" /> 25 </Compiler> 26 <Linker> 27 <Add option="-pg -lgmon" /> 28 <Add library="liballegro_monolith-debug-static" /> 29 <Add directory="../../../MinGW_Dev_Lib/lib" /> 30 </Linker> 31 </Target> 32 <Target title="Release32"> 33 <Option platforms="Windows;" /> 34 <Option output="bin/Deluxe Pacman 2" prefix_auto="1" extension_auto="1" /> 35 <Option working_dir="bin" /> 36 <Option object_output="obj/" /> 37 <Option type="0" /> 38 <Option compiler="gcc" /> 39 <Option projectLinkerOptionsRelation="2" /> 40 <Compiler> 41 <Add option="-O2" /> 42 <Add option="-DRELEASE" /> 43 </Compiler> 44 <Linker> 45 <Add library="allegro_monolith-static" /> 46 </Linker> 47 <ExtraCommands> 48 <Add after='upx --best &quot;$Release32_OUTPUT_FILE&quot;' /> 49 </ExtraCommands> 50 </Target> 51 </Build> 52 <Compiler> 53 <Add option="-march=i686" /> 54 <Add option="-Werror" /> 55 <Add option="-std=gnu11" /> 56 </Compiler> 57 <Linker> 58 <Add option="-static" /> 59 <Add option="-static-libgcc" /> 60 <Add library="dumb" /> 61 <Add library="FLAC" /> 62 <Add library="OpenAL32.dll" /> 63 <Add library="vorbisfile" /> 64 <Add library="vorbis" /> 65 <Add library="freetype" /> 66 <Add library="ogg" /> 67 <Add library="png16" /> 68 <Add library="physfs" /> 69 <Add library="zlibstatic" /> 70 <Add library="gdiplus" /> 71 <Add library="uuid" /> 72 <Add library="kernel32" /> 73 <Add library="winmm" /> 74 <Add library="psapi" /> 75 <Add library="opengl32" /> 76 <Add library="glu32" /> 77 <Add library="user32" /> 78 <Add library="comdlg32" /> 79 <Add library="gdi32" /> 80 <Add library="shell32" /> 81 <Add library="ole32" /> 82 <Add library="advapi32" /> 83 <Add library="ws2_32" /> 84 <Add library="shlwapi" /> 85 <Add library="stdc++" /> 86 <Add library="dsound" /> 87 </Linker> 88 <Unit filename="a5_error.c"> 89 <Option compilerVar="CC" /> 90 </Unit> 91 <Unit filename="a5_error.h"> 92 <Option compilerVar="CC" /> 93 </Unit> 94 <Unit filename="a5_scale_screen.c"> 95 <Option compilerVar="CC" /> 96 </Unit> 97 <Unit filename="a5_scale_screen.h"> 98 <Option compilerVar="CC" /> 99 </Unit> 100 <Unit filename="a5_screenshot.c"> 101 <Option compilerVar="CC" /> 102 </Unit> 103 <Unit filename="a5_screenshot.h" /> 104 <Unit filename="dp2_collision.c"> 105 <Option compilerVar="CC" /> 106 </Unit> 107 <Unit filename="dp2_collision.h" /> 108 <Unit filename="dp2_config.c"> 109 <Option compilerVar="CC" /> 110 </Unit> 111 <Unit filename="dp2_config.h" /> 112 <Unit filename="dp2_ghost.h" /> 113 <Unit filename="dp2_gui.c"> 114 <Option compilerVar="CC" /> 115 </Unit> 116 <Unit filename="dp2_gui.h" /> 117 <Unit filename="dp2_hiscore.c"> 118 <Option compilerVar="CC" /> 119 </Unit> 120 <Unit filename="dp2_hiscore.h" /> 121 <Unit filename="dp2_main.c"> 122 <Option compilerVar="CC" /> 123 </Unit> 124 <Unit filename="dp2_main.h"> 125 <Option compilerVar="CC" /> 126 </Unit> 127 <Unit filename="dp2_map.c"> 128 <Option compilerVar="CC" /> 129 </Unit> 130 <Unit filename="dp2_map.h" /> 131 <Unit filename="dp2_options.c"> 132 <Option compilerVar="CC" /> 133 </Unit> 134 <Unit filename="dp2_options.h" /> 135 <Unit filename="dp2_pacman.h"> 136 <Option compilerVar="CC" /> 137 </Unit> 138 <Unit filename="macros.h" /> 139 <Unit filename="resource.h"> 140 <Option compilerVar="CC" /> 141 </Unit> 142 <Unit filename="resource.rc"> 143 <Option compilerVar="WINDRES" /> 144 </Unit> 145 <Unit filename="vec2d_stack.c"> 146 <Option compilerVar="CC" /> 147 </Unit> 148 <Unit filename="vec2d_stack.h" /> 149 <Extensions> 150 <code_completion /> 151 <debugger /> 152 <envvars /> 153 <AutoVersioning> 154 <Scheme minor_max="10" build_max="0" rev_max="0" rev_rand_max="10" build_times_to_increment_minor="100" /> 155 <Settings autoincrement="0" date_declarations="0" use_define="0" update_manifest="0" do_auto_increment="0" ask_to_increment="0" language="C" svn="0" svn_directory="" header_path="..\version.h" /> 156 <Changes_Log show_changes_editor="0" app_title="released version %M.%m.%b of %p" changeslog_path="ChangesLog.txt" /> 157 <Code header_guard="VERSION_H" namespace="AutoVersion" prefix="" /> 158 </AutoVersioning> 159 <DoxyBlocks> 160 <comment_style block="0" line="0" /> 161 <doxyfile_project /> 162 <doxyfile_build /> 163 <doxyfile_warnings /> 164 <doxyfile_output /> 165 <doxyfile_dot /> 166 <general /> 167 </DoxyBlocks> 168 </Extensions> 169 </Project> 170</CodeBlocks_project_file>

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

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I've uploaded new binary distributions of Allegro 5.2.1.1. See the latest edit in the OP for details. They now include the D3D dlls, link statically to the CRT, and include a full list of libraries to link when linking statically.

Please update your packages accordingly.

Neil Roy
Member #2,229
April 2002
avatar

Awesome, thanks again Edgar!

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

A. van Patmos
Member #15,349
October 2013

I look forward to using the binaries and thanks for the cbp file guys but this

7za e Allegro5211_MinGW5302_Rel3.tar.7z

gives

Extracting  Allegro5211_MinGW5302_Rel3.tar     Unsupported Method

Using x does not help, l for list contents works. The compression method used varies, right? Sometimes WinRAR can extract but usually not. And 7za has never failed yet. What can I do?

 1   2 


Go to: