Build notes?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, LCMark

Post Reply
n9yty
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 52
Joined: Thu Feb 28, 2013 11:33 pm

Build notes?

Post by n9yty » Thu Apr 18, 2013 6:28 pm

Hi,

I see the contribution page still doesn't have any hints on compiling, so I hope asking here is not out of bounds. And maybe it is because I am going outside of the "engine" and into IDE territory I think... But I would like to be able to build from the source and understand the parts before digging into things much deeper.

I managed to get my environment and files so that I can compile against the 10.6 SDK on my 10.8 machine. I can run a build from the main stage.xcodeproj file without errors. Actually, I built it from the terminal with this:

xcodebuild -arch i386 -sdk macosx10.6 -project stage.xcodeproj GCC_VERSION=com.apple.compilers.llvmgcc42 CC=llvm-gcc-4.2

That way I didn't have to tweak the xcconfig files.

However the resulting .app bundle doesn't launch because the Toolset directory [and others] are not installed in the right place in the app bundle, at least from what I can see, and the .setup.txt file which contains information about all the files in the bundle is missing. Basically, the generated app bundle from stage.xcodeproj doesn't have all the pieces the distributed .app bundle does, so there are steps I am missing. ;)

So, is there a short set of notes somewhere about what the build process should be to generate a working .app bundle from the git repo for the community release?

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 996
Joined: Thu Apr 11, 2013 11:27 am

Re: Build notes?

Post by LCMark » Thu Apr 18, 2013 6:39 pm

We are working on instructions (and also the build process) - however, getting an IDE engine to run with the IDE from Xcode is straight-forward.

If the IDE engine can't find a Toolset folder in the right place, then it searches in the folder specified by REV_TOOLS_PATH environment variable (if present) and if not looks in the current working directory.

Just go to the LiveCode target in the drop-down (in Xcode 4.x), click Edit Scheme, select the 'Run' scheme and modify the REV_TOOLS_PATH variable appropriately to point to the ide folder inside your local livecode repository.

n9yty
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 52
Joined: Thu Feb 28, 2013 11:33 pm

Re: Build notes?

Post by n9yty » Thu Apr 18, 2013 6:42 pm

runrevmark wrote:We are working on instructions (and also the build process) - however, getting an IDE engine to run with the IDE from Xcode is straight-forward.
Thanks, Mark, and I should have mentioned I saw that note in another thread here, but I was interested in building a standalone app bundle which wasn't covered. I'll be patient while you continue the excellent work you are doing, it will all come together in time. :)

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 996
Joined: Thu Apr 11, 2013 11:27 am

Re: Build notes?

Post by LCMark » Thu Apr 18, 2013 6:47 pm

Ah - I see :)

There isn't a facility to build a standalone IDE app - either you can run it through Xcode pointing at an 'ide' folder, or build it into an installer (and DMG).

The stack to build an installer is 'builder/builder.rev' - if you load this into LiveCode Community having built the Mac 'stage.xcodeproj' project then you should be able to build a Mac installer by checking 'Mac OS X' and clicking 'Build Tools'.

Note, however, this won't be a complete build as the non-Mac components will be missing.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1561
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Build notes?

Post by monte » Thu Apr 18, 2013 9:53 pm

xcodebuild -arch i386 -sdk macosx10.6 -project stage.xcodeproj GCC_VERSION=com.apple.compilers.llvmgcc42 CC=llvm-gcc-4.2
why didn't I think of that... thanks, you just saved me having to change the config file every time I checkout
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2695
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Build notes?

Post by mwieder » Thu Apr 18, 2013 10:01 pm

Is there some reason why the gcc version has to be 4.2 on osx? I'm using 4.7.2-2 on 64-bit linux mint (and 4.6.3 for the 32-bit builds).

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1561
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Build notes?

Post by monte » Thu Apr 18, 2013 10:58 pm

4.2 might have been the version that came with 10.6 which is the most recent we can compile against until it's cocoafied. I just found this which might help us in the short term: http://devernay.free.fr/hacks/xcodelegacy/
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2695
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Build notes?

Post by mwieder » Thu Apr 18, 2013 11:03 pm

Thanks. Yes, that does help.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 996
Joined: Thu Apr 11, 2013 11:27 am

Re: Build notes?

Post by LCMark » Fri Apr 19, 2013 8:33 am

The Apple GCC compilers have Mac specific extensions - so you can only really use them to compile code for Mac (e.g. Frameworks and various other stuff). I think the most recent gcc Apple used was 4.2... However, I think they've moved most of their (compiler) development effort to clang and llvm these days.

Post Reply

Return to “Engine Contributors”