CodeShop

Here’s an example Jamfile that you can use to build the LocateMe example with BJAM. The jamfile basically just sums up the sources and resources that need to be compiled. BJAM already supports the Darwin toolset.

The application is compiled and installed in your iPhone Simulator user directory. If you want to compile for the iPhone Simulator you invoke bjam with the following command:


bjam --toolset=darwin macosx-version=iphonesim-2.0
If you want to compile for the iPhone device you have to change the architecture to ARM.

bjam --toolset=darwin macosx-version=iphone-2.0 architecture=arm release

Also see the article about automatically deploying your application to the iPhone using Capistrano.

The complete jamfile.v2 for reference:


# jamfile.v2
#
#
# bjam --toolset=darwin macosx-version=iphonesim-2.0
# bjam --toolset=darwin macosx-version=iphone-2.0 architecture=arm release

import ibtool ;

project locate_me
  : source-location .
  : requirements
  : usage-requirements
  ;

# RESOURCES = Background.png Default.png HelloWorld.xib MainWindow.xib Icon.png Info.plist ;
RESOURCES = Default.png Icon.png Info.plist Localizable.strings ;

nib resources/FlipsideView : en.lproj/FlipsideView.xib ;
nib resources/MainView : en.lproj/MainView.xib ;
nib resources/MainWindow : en.lproj/MainWindow.xib ;

alias compiled_resources : resources/FlipsideView resources/MainView resources/MainWindow ;

exe LocateMe
  : main.m
    Classes/AccuracyPickerItem.m
    Classes/FlipsideViewController.m
    Classes/LocateMeAppDelegate.m
    Classes/MainViewController.m
    Classes/MyCLController.m
    Classes/RootViewController.m
  : <framework>/System/Library/Frameworks/UIKit
    <framework>/System/Library/Frameworks/Foundation
    <framework>/System/Library/Frameworks/CoreLocation
  ;

install simulator
  : LocateMe
  :
    <location>"~/Library/Application Support/iPhone Simulator/User/Applications/00000000-0000-0000-0000-000000000000/LocateMe.app" 
    <install-dependencies>on
    <install-type>EXE
  ;

install resources
  : $(RESOURCES) compiled_resources
  : <location>"~/Library/Application Support/iPhone Simulator/User/Applications/00000000-0000-0000-0000-000000000000/LocateMe.app" 
  ;

Sorry, comments are closed for this article.