|
|
| Allegro 4 for Linux and OSX |
|
Cisco Mir
Member #13,959
January 2012
|
Hello people! About a year ago I released my first Allegro game (well, really a remake of an old game), Alley Cat Remeow Edition: https://gamejolt.com/games/alleycatremeow/327439 The game works on windows and I consider it a finished project, but some people have been asking me if I would release a version for Mac or Linux. While it was my intention in the beginning, I never got the opportunity of having my programing enviorment working on either of those systems, so I was never able to compile it for those systems. So, I just wanted to ask: does anyone know how to compile programs for Allegro 4 on those systems, or may want to help me do so? That would be greatly appreciated, thanks! |
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
I don't own any OSX machines, so I can't help you there, but Linux is a fairly simple straightforward matter. On Ubuntu, it's pretty easy. sudo apt-get install liballegro4-dev Then to compile and link with allegro 4, you use allegro-config. Type it at a prompt to see options. g++ -Wall -Wextra -Wshadow -g -o main.out `allegro-config --cflags` main.cpp `allegro-config --libs`
EDIT Homebrew might have binaries for Allegro 4 on OSX. 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 |
|
Cisco Mir
Member #13,959
January 2012
|
Thanks for that fast answer! I have not much idea of linux either osx, but that is a beginning, I will try what you said! Is there any way of compiling it so I can include the binary executable and all the needed libs in the same folder, so the user doesn't need anything appart from what he downloaded? I was aiming to be able to release only one same zip file that works on all systems, with different executables. |
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
yes, static link. On Windows this is no problem, but on Linux, even if you static link, you'll still have a bunch of dependencies on system libraries. Use ldd to list them, and then copy them into your game folder. Then write a launcher script that adds this library directory to your LD_LIBRARY_PATH environment variable. g++ -Wall -g -o main.out `allegro-config --static --cflags` main.cpp `allegro-config --static --libs`
export LD_LIBRARY_PATH=libdir/:$LD_LIBRARY_PATH
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 |
|
Cisco Mir
Member #13,959
January 2012
|
Thank you very much! I will give it a try! |
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Even if you do static link, you should still distribute a single zip file for each OS you use. There's no point for me to download an OSX binary, for example. Bump for progress and possible questions. 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 |
|
|