Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » I've got it working, but I want to do it multi platform, so how do I do it?

This thread is locked; no one can reply to it. rss feed Print
I've got it working, but I want to do it multi platform, so how do I do it?
Lohkdesgds
Member #21,578
October 2021
avatar

I mean I have Visual Studio working with the nuget package, this feels kinda like cheating when a lot of people use Cmake and stuff, so... I've been trying to get something to work, but I can't find many people doing it... I'm not that experienced in Cmake and its dependencies like the JPEG, PNG, TTF stuff, so right now I can get Allegro compiling already, but with no addon.

Is there an easy way to just get everything to "work" like just set the desired output (windows, linux, android, something) and build? How would that be then? I'm really confused about Cmake, that's the thing, and I can't get it to work...

So far I cloned the master branch from github and I'm kinda stuck in this part. I don't know where I'm supposed to get the dep files from (maybe I know some, but I'm not 100% sure), then where should I put them? Why isn't there a script or something to do that? Is it not straight forward like that? Is it possible to have a script that does that? It'd be nice tbh.

The real things I need is just the "nuget" version but with Cmake compiling a debug version and a static monolith release version (I think that's the name for the all-in-one-exe version).

Thank you.

amarillion
Member #940
January 2001
avatar

If only... Compiling on different platforms is a pain, and there is no silver bullet.

Cmake can help a lot. But still, you'll need to set up the toolchain on each OS, then write a cmakefile that works on each of them. Best start with a modest goal of just compiling on two OSes before you tackle everything.

I've attempted to make a cross-platform build environment based on docker, and here is how far I got: https://www.allegro.cc/forums/thread/618390. At the moment it only works for windows + linux, and it isn't quite turn-key. Still, I'll keep working on it because I do believe this approach will help eventually.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

There is Nuget for MSVC and MinGW-W64 binaries for Windows.

There is an android package provided by elias.

Linux is straight forward. Mostly just using the package manager and then cmake.

I don't know if there are any binaries for iOS. Not sure how to build on OSX.

Take a look at this page on the wiki and see if it helps :

https://github.com/liballeg/allegro_wiki/wiki/Quickstart

Go to: