ENIGMA Forums

General fluff => General ENIGMA => Topic started by: sorlok_reaves on September 01, 2014, 12:58:46 PM

Title: Cross-compiling from Linux to OS-X works --interested?
Post by: sorlok_reaves on September 01, 2014, 12:58:46 PM
Hey all,

Somewhat by chance, I was able to get Iji working on OS-X by cross-compiling on Linux. This only requires minimal changes (plus the compiler's .ey file and some setup)  --it is much easier than cross-compiling to Windows. My question is: are you guys interested in this? If so, I can make a pull request and a wiki page; if not, I'll just keep this in my own fork.

Title: Re: Cross-compiling from Linux to OS-X works --interested?
Post by: Goombert on September 01, 2014, 02:46:03 PM
Uhhh, go ahead and send the pull request. I am interested to see how much work it took, and if you want to do a Wiki page go for it. This is definitely going to be a highly requested feature, as far as I am concerned if the work is already done don't be afraid to go ahead and show it to us and that goes for just about all features really. However I would like to indicate that your other fixes/improvements are probably more higher priority but it's better to show us and we all discuss it than throwing it away or you know.  (Y)

In other words there is no sense in letting good work go to waste, and both you and egofree have made very excellent contributions to the project, a hell of a lot cleaner than my first contributions I might add.
Title: Re: Cross-compiling from Linux to OS-X works --interested?
Post by: sorlok_reaves on September 01, 2014, 07:27:24 PM
This contains the basic requirements for cross-compiling:
https://github.com/enigma-dev/enigma-dev/pull/812/files
Title: Re: Cross-compiling from Linux to OS-X works --interested?
Post by: time-killer-games on September 04, 2014, 11:58:26 AM
How do I cross-compile?

Does this mean I can compile for Mac without a Mac? Does this mean I compile for Mac by compiling in a virtual machine embedding Mac inside a Linux or Windows PC? Both of which go against Apple's terms. I could be wrong but this isn't legal either. You buy a Mac, you don't own it, you rent it for life, either you go by their terms or you have to jump in a lake.

Mac software can only be built on Mac in order for it to be accepted on their store. As for the virtual machine, if you want to run Mac software legally, you need to own a physical Mac device to run it on. Even if you already own a physical Mac and try to run Mac in a VM on Windows or Linux the rules still apply.
Title: Re: Cross-compiling from Linux to OS-X works --interested?
Post by: Goombert on September 04, 2014, 12:14:35 PM
Have I mentioned lately how much I hate Apple, Inc?
Title: Re: Cross-compiling from Linux to OS-X works --interested?
Post by: sorlok_reaves on September 04, 2014, 12:14:51 PM
Quote from: time-killer-games
Does this mean I can compile for Mac without a Mac?

Not quite. You need a Mac to extract the SDK. After that, you can toss it out. I can't bundle the SDK because that's against Apple's TOS.

Quote from: time-killer-games
Does this mean I compile for Mac by compiling in a virtual machine embedding Mac inside a Linux or Windows PC?

Maybe? But I don't think that's a particularly useful way of doing things. And, as you say later, running OSX in a VM is against Apple's TOS. So let's forget VM's; they're not relevant to this discussion.

Quote from: time-killer-games
Both of which go against Apple's terms. I could be wrong but this isn't legal either. You buy a Mac, you don't own it, you rent it for life, either you go by their terms or you have to jump in a lake.

I couldn't care a fig for Apple's TOS. And being in violation of a TOS is not illegal if the TOS can be shown to be wrong. I'd love to see someone dragged to court for buying OSX (which I did) and then extracting a file from the package  ---there's no way that would hold up. However, your point is very much valid with respect to distribution, which I'll cover next.

Quote from: time-killer-games
Mac software can only be built on Mac in order for it to be accepted on their store.

This is a very good point! I will assume it is true, since I am not too familiar with the App store. In light of this, the purpose of cross-compiling is either:

If you want to distribute your cross-compiled app, you will have to boot up a Mac and compile it there. But you can cross-compile it hundreds of times to test it, as long as the final build is from OS-X (which also works; I checked). This is valuable to me, at least. If it is valuable to other contributors, it will be merged; else, it will remain in my fork.

I'm glad you brought up these points, because anyone who develops for OS-X should be aware of Apple's inane policies. But I think they do not apply to the tools (or ENIGMA), as we do not bundle anything from OSX itself, so Apple cannot assume that someone who downloads ENIGMA has signed their TOS.


Have I mentioned lately how much I hate Apple, Inc?

They're not worth your time, honestly. I deal with OS-X because I care very much for Apple's users. My opinions on the company are not relevant to the discussion (but I suspect they are the same as yours).