[gambit-list] A couple of random questions
feeley at iro.umontreal.ca
Mon Jul 25 16:15:14 EDT 2011
On 2011-07-25, at 3:11 PM, mikel evins wrote:
> On Jul 25, 2011, at 5:55 AM, Marc Feeley wrote:
>> On 2011-07-25, at 4:44 AM, mikel evins wrote:
>>> On Jul 25, 2011, at 3:06 AM, Alex Queiroz wrote:
>>>> On Fri, Jul 22, 2011 at 10:41 AM, mikel evins <mevins at me.com> wrote:
>>>>> What's more, I'd like to set up and configure Gambit for development, along with some local libraries and tools, and package the resulting development platform as a file tree that other programmers can simply check out or untar on their systems to obtain the tools, with no (or minimal) additional configuration.
>>>>> I've set up Gambit a number of times to build OSX apps (indeed, I have a Gambit-based app on the App Store). I've also set up and built iOS projects.
>>>>> What I would like to do now is set up for both, and on iOS both for simulators and for devices, preferably with everything in a common containing directory so that the whole set of tools can conveniently be cloned from one machine to another. That way, that all involved programmers can easily set up identical toolsets.
>>>> I forked a project from James Long in GitHub which is a "configure
>>>> script helper", calling configure with appropriated parameters for
>>>> creating binaries for the iOS simulator and for devices. It puts each
>>>> one in its own tree, where you can keep adding libraries for each
>>>> environment. I hope this helps.
>>> THanks much; I'll give it a look. It just might be the right thing.
>> Note that there is a similar script in the Gambit distribution. If you execute the script examples/iOS/build-gambit-iOS it will build Gambit in 2 configurations (for the real iPhone/iPad and for the simulator). If you uncomment the last line of the script, it will also build Gambit for Mac OS X. The script is highly automated (it even downloads a recent Gambit distribution, updates it with the latest patches on the Gambit repository, builds it for the device and simulator, and combines the libraries into one using "lipo"). You should also take a look at examples/iOS/GambitREPL.xcodeproj if you want to see an Xcode project which can run on the device and simulator.
>> If you can wait until this afternoon, I will be committing my latest GambitREPL patches to the repository.
> I can always wait; waiting for your updates invariably yields something good.
> Our project is presently using slightly-modified versions of build-gambit-iOS to set up tooling on our dev systems.
> As things stand, the obvious way to build an iOS project is to copy the way it's done for Gambit-REPL, but that's not ideal. Don't get me wrong; it's great to have example sources that reliably build a Cocoa app for iOS on both devices and simulators, but we could wish for improvements. It would be nice if we didn't have to download two full sets of the Gambit sources per app. :-)
> I don't want to ask for too much; I'm well aware that you're a busy guy, and we can certainly make things work as they stand.
> I'll monkey with Makefiles and see what I can accomplish. I'd like to at least arrange things so that we can have just one copy of each flavor of the Gambit sources, and so that our project sources don't need to be in the Gambit source tree to build. I built my own Makefiles for Delectus and made things work, so I'm optimistic.
The Gambit REPL changes have now been committed to the repo.
Note that the new build-gambit-iOS script makes a single copy of the Gambit sources. It compiles it 3 times (i386 for the simulator, and armv6 and armv7 for the real devices), and combines the libraries using "lipo". In the end the gambit-iOS directory that is created takes up 132 MB, of which 32 MB are the libraries themselves. It isn't that much in today's standards, but if you need space you could just keep the libraries that matter to you and delete the rest.
You could also save a lot of space by changing the script so that it doesn't download the distribution "for developers" (which contains the git history). In other words, change:
But in that case you will not be using the very latest sources from the repository.
BTW, if you manage to write a generic makefile to build iOS applications from the command line (no XCode) then I'm interested in having a look.
More information about the Gambit-list