ENIGMA Forums

General fluff => General ENIGMA => Topic started by: RetroX on December 10, 2010, 07:40:25 pm

Title: Cross-compiling
Post by: RetroX on December 10, 2010, 07:40:25 pm
Would be a really neat feature to have.

But I don't see it as being possible currently.

Ideally, LGM would be able to specify a compile command (by default, g++) for the makefiles, as well as a list of default flags to the compilers (such as -m32 and -m64).  This would enable me to do things like turning on the -m32 flag, or using i486-mingw32-g++ as the compile command so that I can cross-compile to Windows.

I also propose that -mtune=generic is added to the default flags, because it avoids runtime conflicts or something like that.  I add that in my packages right now through sed, but it would be a good idea for default.  Probably would be ignored under everything but Linux and Android, but MinGW should still support it.
Title: Re: Cross-compiling
Post by: Josh @ Dreamland on December 11, 2010, 01:10:25 am
Just leave that to me.

It's been a planned part of the iPhone/Android integration. By the same mechanism you chose a compiler for those devices, you will be able to choose a cross-compiler.

Issue is, Ism, TGMG, and myself are never on concurrently.
Title: Re: Cross-compiling
Post by: Fede-lasse on December 11, 2010, 07:06:23 am
Issue is, Ism, TGMG, and myself are never on concurrently.
Good thing there's a forum for this. And, you can leave messages in the IM.
Title: Re: Cross-compiling
Post by: Josh @ Dreamland on December 11, 2010, 10:12:30 am
This isn't something that can be done with the three of us PMing each other. We need to discuss a spec that provides for the needs of all supported platforms.
Title: Re: Cross-compiling
Post by: kkg on December 11, 2010, 11:14:50 am
I believe for a ridiculous majority of Windows and Linux users, this is a necessity if we want to port our games to Mac XD
Of course you already know this, I'm just spectacular at stating the obvious.
Title: Re: Cross-compiling
Post by: Josh @ Dreamland on December 11, 2010, 11:40:17 am
Not just Mac. We're sticking to Mac because I've not yet started the Wii port and I don't own any other consoles for which I'd like to see ENIGMA work in the near future. It may happen that I'll end up thinking up a spec tailored to the Wii, and TGMG will make it work for Mac, iPhone, and Android.

Not to be a dick or anything, as TGMG has contributed some ideas to this mix, but it's so far been me who ends up writing the big picture shit that just needs to work, anyway. (I'd never expect anyone to mess with any of the parsers; it was neat enough that TGMG made the necessary modifications to the compiler source to get it working for those platforms at all). It's just that, as far as I can tell, this cross-compiling nonsense isn't going to happen until I have a release ready for Wii (which may in fact be sometime near New Year's).
Title: Re: Cross-compiling
Post by: kkg on December 11, 2010, 11:51:23 am
Until developers really and utterly want their games to be created for all major platforms with zero fuss, I wouldn't think this would be a HUGE concern right now. As long as you've already thought about it, that's enough for now I'd imagine.
I'd rather see collisions first :3 :3 :3

But a release for the Wii by New Years? Really? That's unexpectedly quick, I didn't even know you were working on a Wii release rofl.
Title: Re: Cross-compiling
Post by: TheExDeus on December 11, 2010, 02:54:40 pm
I think more function implementation should be done. Although I could be only one that thinks that. :D All of the drawing functions are essentially done (except surfaces). The rest of the resource functions just touch external loading and memory management (load and free). Then there is lots of other functions, but from drawing and so gameplay stand point everything could be ready for simple game creation and testing. As drawing is done by openGL I suspect it works for win, mac and linux out of the box. I would want to see the "Platform" dropdown box in LGM Enigma Settings to actually allow me choose between the three, but whatever. I would not be able to test it anyway as I have only windows right now.
Also, Wii support seems cool. Lots of possibilities there, thou I never got that damn thing. Maybe this could be a good enough reason to buy one.
Title: Re: Cross-compiling
Post by: RetroX on December 11, 2010, 08:53:05 pm
Also, as a random thing to add, this will also allow us to use other libraries in our games by enabling usage of linker flags.

For example, if I wanted to use Box2D in a game, I could add the -lBox2D flag.
Title: Re: Cross-compiling
Post by: Josh @ Dreamland on December 11, 2010, 10:17:39 pm
<..<
Opened ENIGMA settings lately, Retro?
Title: Re: Cross-compiling
Post by: IsmAvatar on December 12, 2010, 01:58:53 pm
<..<
Opened ENIGMA settings lately, Retro?

I'm not seeing it either.
Title: Re: Cross-compiling
Post by: TheExDeus on December 12, 2010, 02:00:25 pm
Quote
I'm not seeing it either.
Me too, dunno what Josh meant. I guess "Definitions" or "Initialization". Also, do any of thous settings/buttons do anything?
Title: Re: Cross-compiling
Post by: RetroX on December 12, 2010, 05:05:57 pm
<..<
Opened ENIGMA settings lately, Retro?
Linkers aren't in there, though. :V
Title: Re: Cross-compiling
Post by: IsmAvatar on December 12, 2010, 07:08:16 pm
Quote
I'm not seeing it either.
Me too, dunno what Josh meant. I guess "Definitions" or "Initialization". Also, do any of thous settings/buttons do anything?
These four editors specify only C++/EDL code. You can't specify linkers to be passed to the compiler in them, as far as I'm aware.
Title: Re: Cross-compiling
Post by: Josh @ Dreamland on December 13, 2010, 12:07:51 am
No, there is no special form for links. I was indicating that systems like Box2D would be added to the collision system list. Setting custom links is messy; that should only be required when the system can't be integrated elsewhere. But yes, that much is necessary.

As far as changing the compile flags, we have a lot more than that to change, as is becoming more and more evident. Someone signed into the IRC who was having problems getting ENIGMA to coexist peacefully with DevKitPro's Msys. It was a complete clusterfuck. It didn't help that Tortoise SVN was betraying us the whole way, either...

Damn.