![]() |
|
Guys... why does Windows suck to install Allegro? |
Mark Oates
Member #1,146
March 2001
![]() |
I'm having trouble installing Allegro for Windows. It's been a long time and I've become complacent with Mac and how easily it works. I'd like to build from source and I feel there's gotta be some secret trick I'm missing involving the dependencies. Doesn't Windows have package managers now (Chocolatey?) that can easily be used to install all the dependencies? Are there scripts, for example? I've downloaded a few different installers already (MinGW, CMake, DirectX, VS Build Tools, etc), I'm not convinced these are all going into the right place on this system, and to be honest am really bummed how many of these are trying to install search bar plugins, or asking for email addresses, and so forth. Is there a package manager way to build? Something terminal only? Something that sill allows me to compile allegro from source? -- |
ks
Member #1,086
March 2001
|
For Visual Studio I use VCPkg (https://github.com/microsoft/vcpkg) and for MSys2 it ships with pacman which also allows for easy installation.
|
GullRaDriel
Member #3,861
September 2003
![]() |
And for VC++ or whatever you have Edgar Reynaldo's monolith builds "Code is like shit - it only smells if it is not yours" |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Windoze is eazy. Just use my binaries for MinGW-W64. See my build guide, there is a link at the bottom which you can find here : http://members.allegro.cc/EdgarReynaldo/BuildA5.html https://bitbucket.org/bugsquasher/unofficial-allegro-5-binaries/downloads/ EDIT 1) MSVS MSVC++2017+ and Nuget. 2) MSYS2 and pacman. 3) MinGW-W64 and binaries 4) Build it yourself My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Chris Katko
Member #1,881
January 2002
![]() |
nuget? -----sig: |
SiegeLord
Member #7,827
October 2006
![]() |
Here's the Nuget link, for completeness (MSVC only): https://www.nuget.org/packages/Allegro and just the dependencies https://www.nuget.org/packages/AllegroDeps. It's possible to grab the dependencies manually if you want to compile Allegro from source, e.g. see these lines here: https://github.com/liballeg/allegro5/blob/master/appveyor.yml#L8. MSYS2 comes with all the dependencies (and Allegro itself), it's what I use for my day-to-day Windows development. The official MSYS2 packages https://github.com/liballeg/allegro5/releases/tag/5.2.5.0 and https://github.com/liballeg/allegro_winpkg/releases/tag/1.9.0 also can be used. If you're really adventurous, you can regenerate the official packages by following directions here: https://github.com/liballeg/allegro_winpkg/tree/master/universal, that compiles both the dependencies and Allegro from source. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
GullRaDriel
Member #3,861
September 2003
![]() |
Hell, I ever did find a allegro5 package for arm on alpine linux. Just had to apk add and voilà. Do not take the install process as an excuse for your coding laziness, Katko ;-) "Code is like shit - it only smells if it is not yours" |
Mark Oates
Member #1,146
March 2001
![]() |
SiegeLord said: MSYS2 comes with all the dependencies (and Allegro itself), it's what I use for my day-to-day Windows development. That sounds like something I could go for. OK, I have installed MSYS2 from the one-click installer. I have several questions just about it in general:
I've gone the route of using pacman to install the packages git, make, cmake, and mingw-w64-x86_64-toolchain (with all).
-- |
bamccaig
Member #7,536
July 2006
![]() |
I would suggest somebody that is familiar with fetching and building all dependencies and then building Allegro against it to script the process so that anybody can automate it easily just by invoking the script (and if they want to dig into the details they can review the script). It is a lot of bullshit to fetch individual packages, learn their intricacies, build them all independently (after recursively fetching THEIR dependencies), and then link them all into an Allegro build. This should be something that a script (e.g., .cmd or .ps1) can capture so that it's easy for any newbie to review and modify... It's 2020 ffs. That's basically what package managers are anyway. Scripts to fetch dependencies, except they use their own store to prevent the upstream from changing and breaking the scripts, and most cache the binaries instead of rebuilding from source to speed things up... That's how I live my day to day life. Any tedious process that I have to repeat gets scripted so that I can trivially repeat it. Maintaining the scripts is generally not that much work, especially compared to the manual process. (I'd be happy to script it myself, but I'm not happy to figure out all of the things that need to be done... That would need to be described to me in detail with exact URLs and commands (which is basically the scripting part anyway)...) Append: Mark, I think that some MSYS packages (and binaries) are named just like the package you installed, something like msys-blah-blah-x86_64-gcc instead of just gcc... There are a few different ways you could figure out the name of the binaries. Searching the PATH or file system, finding a command to list the files in the package, etc. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Mark Oates
Member #1,146
March 2001
![]() |
bamccaig said: This should be something that a script (e.g., .cmd or .ps1) can capture so that it's easy for any newbie to review and modify... It's 2020 ffs I feel the same way. OK, so far this is what I have: After installing and opening MSYS (and updating it with sudo pacman -Syu) this would be the start of the script I would use (but it gets stuck at the end): pacman -S mingw-w64-x86_64-gcc --noconfirm pacman -S mingw-w64-x86_64-gdb --noconfirm pacman -S make --noconfirm pacman -S mingw-w64-x86_64-cmake --noconfirm pacman -S git --noconfirm pacman -S mingw-w64-x86_64-pkg-config --noconfirm pacman -S mingw-w64-x86_64-freetype --noconfirm pacman -S mingw-w64-x86_64-libpng --noconfirm pacman -S mingw-w64-x86_64-libjpeg-turbo --noconfirm pacman -S mingw-w64-x86_64-libvorbis --noconfirm pacman -S mingw-w64-x86_64-flac --noconfirm pacman -S mingw-w64-x86_64-physfs --noconfirm pacman -S mingw-w64-x86_64-dumb --noconfirm pacman -S mingw-w64-x86_64-libtheora --noconfirm export PATH=$PATH:/mingw64/bin mkdir -p Repos cd Repos git clone https://github.com/liballeg/allegro5.git cd allegro5 mkdir build_allegro_monolith cd build_allegro_monolith cmake G"MSYS Makefiles" -D"CMAKE_SYSTEM_PREFIX_PATH:PATH=/mingw64/x86_64-w64-mingw32" -DWANT_MONOLITH=on .. It does well, but then gets stuck at the last cmake step, not being able to find X11 development tools. The terminal output is below, I've attached the CMakeError.log. -- Guessed MinGW directory: /mingw64 -- Allowing GCC/Clang to use SSE instructions -- Performing Test ALLEGRO_HAVE_PROCFS_ARGCV -- Performing Test ALLEGRO_HAVE_PROCFS_ARGCV - Failed -- Performing Test ALLEGRO_HAVE_SV_PROCFS_H -- Performing Test ALLEGRO_HAVE_SV_PROCFS_H - Failed Using OpenGL -- Could NOT find X11 (missing: X11_X11_LIB) CMake Error at CMakeLists.txt:707 (message): X11 not found. You may need to install X11 development libraries. -- Configuring incomplete, errors occurred! See also "/home/Mark/Repos/allegro5/build_allegro_monolith/CMakeFiles/CMakeOutput.log". See also "/home/Mark/Repos/allegro5/build_allegro_monolith/CMakeFiles/CMakeError.log". I tried looking for a pacman package of x11 development tools, but pacman -Ss x11 or a web search didn't reveal anything. --- BTW, I had found this, it was helpful: https://www.allegro.cc/forums/thread/616828 -- |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Use "MinGW Makefiles", not MSYS. That's different. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
SiegeLord
Member #7,827
October 2006
![]() |
MSYS Makefiles is correct, I don't understand why it's complaining about for X11. I'd nuke the build directory and try again. I just tested a fresh install of MSYS and I didn't get that error. Mark Oates said: I feel the same way. FWIW the allegro_winpkg repository I linked to has such scripts (otherwise packaging Allegro would be a pain "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Chris Katko
Member #1,881
January 2002
![]() |
GullRaDriel said: Do not take the install process as an excuse for your coding laziness, Katko ;-) I know you're kidding but I always use Allegro, DAllegro, on Linux, compiled from source. Visual Studio is nice for like C# stuff. But man, it's one fat momma. -----sig: |
Polybios
Member #12,293
October 2010
|
Mark Oates said: When I installed git with `pacman -Sy git`, I was able to `git --version`. But after installing `pacman -Sy mingw-w64-x86_64-toolchain`, then `gcc --version` is not found. What's the difference between the two install procedures?
It's been a while but IIRC your PATH depends on which variant of the shell you open (use the mingw-w64 one). MSYS-2 introduction said:
MSYS2 consists of three subsystems and their corresponding package repositories, msys2, mingw32, and mingw64. I have no idea about the X11 related error. Btw., now when I think about it, the question which makefiles to use might actually depend on the variant of make you install. |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Go ahead and use MSYS Makefiles if you want your program to depend on the MSYS runtime.... My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Chris Katko
Member #1,881
January 2002
![]() |
Edgar Reynaldo said: Go ahead and use MSYS Makefiles if you want your program to depend on the MSYS runtime.... Go ahead and use Cmake Makefiles if you want your program to depend on the Cmake runtime.... -----sig: |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Uhm, no ChrisKatko. Not the same. You'll have to run your program within MSYS, not as a windows executable. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Mark Oates
Member #1,146
March 2001
![]() |
Ok, working through this problem has made me realize I'm actually trying to solve several problem cases simultaneously, so I've scaled back to just the simplest one. The problem cases are: 1. Update my build system to also work on Windows, which requires building with Allegro. After I scope it down to just #1, I've been able to just go with pacman install allegro which is enough. Constraining myself to MSYS2 (in MINGW64) has helped a lot, and at this point there's enough to digest and work through. I honestly really like the system at this point. It's very similar to what I work with on my mac, and it's not hard to slowly "port over" my .zshrc to .bashrc. Each of the dependencies has some quirks so far in Windows, there's some quirks with ncurses, vim plugins, paths, and some little tools I use like rerun. But it's definitely working as I sort all those out. I feel like Pickle Rick slowing getting back into mobility. Eventually, I'll get to the point where I compile Allegro from source and achieve #2, 3, and 4, but for now definitely the number of simultaneous problems to work through is diminishing, and I've gotten an Allegro window to run. -- |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
<blatant spot> My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|