Compiling from Source on macOS

All discussions of compiling from source should go here.
Post Reply
User avatar
OpenXTalkPaul
Posts: 1810
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Compiling from Source on macOS

Post by OpenXTalkPaul »

Over the weekend I just started looking into compiling the engine from source on macOS 10.14.6.
I was able to use gyp to generate the xcodeproj files (in "build-mac" which I uploaded to the repo) for building in Apple's XCode. The projects are setup for macOS 10.9 SDK compatibility. The problem with that is I'm running 10.14 and so have an Xcode that comes setup ONLY for targets 10.14+.
So for anyone else trying to do this here's what I've found as a workarounds instead of having to install old versions of macOS:
There's a backwards compatibility script here:
https://github.com/devernay/xcodelegacy
You can get the old macOS SDKs here:
https://github.com/phracker/MacOSX-SDKs
and old full Xcode releases here:
https://xcodereleases.com
and iOS here:
https://github.com/sunmean/iOS-DeviceSupport
https://github.com/anewcorp/iPhoneOS-Pl ... rImage-dmg

https://github.com/caodakeng/Xcode
User avatar
OpenXTalkPaul
Posts: 1810
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Compiling from Source on macOS

Post by OpenXTalkPaul »

If you follow the macOS build instructions then you need a BUNCH of different Xcode versions 6.2,7.3, 8.2,and 8.3, install them all to a folder you create, they're all like > 5GB each, and then you can run a shell script that creates a symbolic link into whatever your current Xcode version is. I would've thought you only really need Xcode 6.2 (which contains the macOS 10.9 & 10.10 SDKs, the minimum os version for running v.9 is macOS 10.9)
User avatar
OpenXTalkPaul
Posts: 1810
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Compiling from Source on macOS

Post by OpenXTalkPaul »

I should say If you’re trying to follow the Mac build instructions on the wrong macOS version, you won’t be able to. For one thing you can’t launch XCode 6.2 on newer versions of macOS such as 10.14, it won’t launch… on older OSX you won’t be able to launch newer Xcode versions, I’m sure there’s a sweet spot, maybe 10.13? You really only need the SDKs from those versions, sym linked into the XCode version that’s current for the macOS version on your system…
The point is just setting up to compile, at least on macOS is a royal pain in the ass.
User avatar
richmond62
Posts: 3038
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Compiling from Source on macOS

Post by richmond62 »

a royal pain in the ass
Not having a donkey that will make things even more difficult. 8-)

On the East side of the pond a rude word for bottom 's 'arse'. . . LOL
-
donkey.jpeg
donkey.jpeg (34.32 KiB) Viewed 10970 times
-

AND, just to be a real pain in the donkey, my 2018 Mac Mini just does not
have the space to install 57 varieties of xCode . . .
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1810
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Compiling from Source on macOS

Post by OpenXTalkPaul »

I don't have the space for it either, at least not on my system partition, which makes things more complicated.
Also, for Xcode 8.2 and 8.3 you need to have twice the space because Apple no longer packages Xcode as a simple dmg, they now use a signed compression format called Xip (not Zip), which can take a LONG time to extract. I fell asleep waiting.

The thing is I should only have to go through this once, because this is all just to extract about 5x 300mb SDKs, which I already know where to get separately (see link in first post in this thread). I'm following the LCC mac build guide to try to figure out exactly which SDKs are actually required. We should be able to do this much more efficiently thereafter, I could upload the whole finished batch somewhere with a shell script that makes the symlinks into, for one example, /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX10.9.sdk
ernie
Posts: 3
Joined: Thu Nov 11, 2021 7:24 pm
Contact:

Re: Compiling from Source on macOS

Post by ernie »

Is there a pre-compiled binary version of OpenXTalk available for MacOS X Catalina?

I am not setup with Xcode to compile yet.

I do have LC 9.6.3 installed but I would rather work with OpenXTalk since LC dropped community support.
User avatar
OpenXTalkPaul
Posts: 1810
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Compiling from Source on macOS

Post by OpenXTalkPaul »

ernie wrote: Thu Nov 25, 2021 4:04 am Is there a pre-compiled binary version of OpenXTalk available for MacOS X Catalina?

I am not setup with Xcode to compile yet.

I do have LC 9.6.3 installed but I would rather work with OpenXTalk since LC dropped community support.
No, not yet anyway, what we have so far is just about all of the changes that remove the words LiveCode and replace it with either OXT, OpenXTalk, or more preferably something more generic like “an xTalk engine” or “The development environment (IDE)” or a Stack instead of “LiveCode Stack”. This involves things like rebuilding the syntax dictionary (which was also expanded in the process), along with a couple of IDE bug fixes, slight modifications, images removed or replaced, and scripts and GUI changes to support DarkMode in the IDE. All of these changes are on GitHub and can be applied to a copy of your existing Mac community install to turn it into OXT IDE, complete with new icons, etc. You simply replace the files inside the Mac app bundle, resources, tools, documentation, toolset, etc. with the coresponding named file/folder from the IDE repo.

If you build it this way you may have to do two things to get macOS to recognized as OXT and not a copy of LCC, zip the whole app bundle and then unzip it, which should get launch services to scan the file, get its icon associations, app info and such from the app bundle. If that doesn’t do the trick, you may have to rebuild the macOS Launch Services cache (the equivalent of “rebuild the desktop file” on macOS classic). Then when you launch OXT, reset your preferences in the preferences window, this should get OXT to build it’s own folders that allow it to coexist alongside of LCC (or any other LC version).


I’d like to have portable modified IDEs for all three platforms packaged up by Dec. 25th or maybe Jan 1st, that way people don’t have to do that sort of thing for themselves, the can just download and install OXT, after that release I’m going to be looking more at compiling the engines from source. I’d like to isolate and make a process for building just the engines, no externals, installer versions, or any of those peripheral things (some of which could be replaced or removed).
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests